トップ 最新 追記

Cocoa練習帳

iOS/iPhone/iPad/watchOS/tvOS/MacOSX/Android プログラミング, Objective-C, Cocoa, Swiftなど

2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|09|10|11|12|
2024|01|02|

2016-10-29 [Playground]Viewをタイムラインに表示

Playgroundでビューをタイムラインに表示してみた。

import Cocoa
import PlaygroundSupport
 
var str = "Hello, playground"
 
var frame = NSRect(x: 0.0, y: 0.0, width: 100.0, height: 100.0)
var view = NSView(frame: frame)
view.wantsLayer = true
view.layer?.backgroundColor = NSColor.red.cgColor
 
/* 非同期処理の許可 */
PlaygroundPage.current.needsIndefiniteExecution = true
 
/* Viewをタイムラインに表示 */
PlaygroundPage.current.liveView = view

_ 【Cocoa練習帳】

http://www.bitz.co.jp/weblog/
http://ameblo.jp/bitz/(ミラー・サイト)

トップ 最新 追記