Hi,
I am trying to develop a generic way to populate UITabeViewDataSource. It is largely working, but I had a print statement in the init() and it was causing a crash. It was printing entityName, a computed property, coded thusly:
public class RecordArray<T: NSManagedObject> {
var entityName: String {
let entity = T.entity()
return entity.name!
}
When I step through it, entity is all zeroes, like a classical objective-c nil, even though entity() is a non-optional function. But in later functions it works.
Does anyone know the reason for this?
---
Mark