Int, String, UIButton, AnyObject
Exclamation!
declare -var x:Int!
unwrap -x!
let w = Int("123") w * 2 class BetterViewController: UIViewController { //var myButton: UIButton }
import UIKit class ViewController: UIViewController { var button:UIButton! override func viewDidLoad(){ super.viewDidLoad() var title = button.titleForState(UIControlState.Normal) } }
import UIKit class Beverage { var category:String init (category: String){ self.category = category } } class HotDrink: Beverage { var pairing:String init(category: String, pairing: String){ self.pairing = pairing super.init(category: category) } } class ColdDrink: Beverage { var vessel:String init (category: String, vessel: String){ self.vessel = vessel super.init(category: category) } }