iOS Swift - Lists and Data Display
Why does this code cause a compile error?
struct Book: Identifiable {
var id: Int
var title: String
}
let b = Book(title: "Swift Guide")
id and title, both non-optional.title, missing id, causing compile error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions