Search This Blog

Thứ Hai, 28 tháng 8, 2017

Cách tạo đối tượng mới trong Realm

var myDog = Dog()
myDog.name = "Rex"
myDog.age = 10

// (2) Create a Dog object from a dictionary
let myOtherDog = Dog(value: ["name" : "Pluto", "age": 3])

// (3) Create a Dog object from an array
let myThirdDog = Dog(value: ["Fido", 5])

Không có nhận xét nào:

Đăng nhận xét