} let user = User(firstName: "John", lastName: "Lin") let post = Post(title: "hello", content: "world") let superTextView = SuperTextView() superTextView.append2("New") superTextView.append2(user) superTextView.append2(post)
"no one" lazy var id:Int = 1 var serverPath: NSURLComponents { get { return NSURLComponents(string: "http://localhost: 3000/users/\(id)")! } } var jsonValue: String { get { return "{\"id\":\(id),\"name\":\"\(name)\"}" } set { print("setting json value to \(newValue)") //set the id & name from json string } } }