Skip to content

Instantly share code, notes, and snippets.

@tfrank64
Last active August 29, 2015 14:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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