i have a simple Question: I just need a Array of Objects - but thats currently not working as expected. Can u help me please?
i want to create a Object of Questions. Every Question has some Properties. And the Class Questions should return an Array of Objects containing each Question.
class Questions: Array<Question> = [] {
init() {
var images : Array<Question> = []
for index in 1...5 {
let myQuestion = Question(name: "maier")
images += myQuestion
}
println(images)
}
}
class Question: NSObject {
var name: String
init(name: String) {
self.name = name
}
}
var q = Questions()
println(q)