Skip to content

Instantly share code, notes, and snippets.

@tfrank64
Last active August 29, 2015 14:12
Show Gist options
  • Save tfrank64/fa7d89449cc0350cf3f6 to your computer and use it in GitHub Desktop.
Save tfrank64/fa7d89449cc0350cf3f6 to your computer and use it in GitHub Desktop.
Example playground to show off the visualzations you can get with Swift playgrounds.
// Playground - noun: a place where people can play
import UIKit
import QuartzCore
var str = "Hello, playground"
var nums = [1, 3, 5, 7, 9, 11, 13]
var count = 1
for num in nums {
count *= num
}
var view = UIView(frame: CGRectMake(0, 0, 100, 100))
view.layer.cornerRadius = 10.0
view.layer.borderColor = UIColor.blueColor().CGColor
view.layer.borderWidth = 10.0
var miniView = UIView(frame: CGRectMake(30, 30, 40, 40))
miniView.backgroundColor = UIColor.greenColor()
view.addSubview(miniView)
view.backgroundColor = UIColor.yellowColor()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment