摘要:
Connect the UI to Code 主题 The weak keyword means that it’s possible for that property to have no value (be nil) at some point in its life. - @IBOutlet 阅读全文
摘要:
Build a Basic UI The AppDelegate class contains a single property: window. With this property the app delegate keeps track of the window in which all 阅读全文
摘要:
import UIKit var v = UIView(frame:CGRectMake(0,0,200, 200)) var b = UIButton(frame: CGRectMake(0, 0, 44, 44)) b.setTitle("44pix btn", forState: UICont 阅读全文
摘要:
//// protocol ExampleProtocol{ var simpleDescription :String{get} mutating func adjust() } class SimpleClass:ExampleProtocol{ var simpleDescription:St 阅读全文
摘要:
//// enum Suit{ case Spades,Hearts,Diamonds,Clubs func simpleDescription () ->String{ switch self { case .Spades: return"Spades" case .Clubs: return " 阅读全文
摘要:
// func sumOf(numbers:Int...)->Int{ var sum=0 for number in numbers { sum+=number } return sum } sumOf() sumOf(4,5,12) // func returnFifteen()-> Int{ 阅读全文
摘要:
// Playground - noun: a place where people can play swift2.2 NO.1 import UIKit var str = "Hello, playground" // Playground - noun: a place where peopl 阅读全文
摘要:
// Playground - noun: a place where people can play swift2.2 NO.2 import UIKit var str = "Hello, playground" let interestingNumbers=[ "Prime":[2,3,5,7 阅读全文