Created
July 24, 2016 08:15
-
-
Save secwang/cd0ddab759ac5cf9c5e69c7955ad84dd to your computer and use it in GitHub Desktop.
test in PlayGround
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //: Playground - noun: a place where people can play | |
| import Cocoa | |
| import XCPlayground | |
| var str = "Hello, playground" | |
| var scrollView = NSScrollView(frame: CGRectMake(0,0,80,100)) | |
| scrollView.backgroundColor = NSColor.controlColor() | |
| var v = NSView(frame: CGRectMake(0,0,100,100)) | |
| var t1 = NSTextField(frame: CGRectMake(0,0,50,50)) | |
| t1.textColor = NSColor.blackColor() | |
| t1.stringValue = "test" | |
| v.addSubview(t1) | |
| scrollView.addSubview(v) | |
| XCPlaygroundPage.currentPage.liveView = scrollView; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment