I am using mogenerator.I am getting CoreData error as follows:
Failed to call designated initializer on NSManagedObject class 'ClassName'.
Anybody please help me to solve this error.
Don't alloc / initalise something that you already have a hand on.. that's why !
Example of use in a cellForRowAtIndexPath
Use
ClassName *class = [arrayOfSomething objectAtIndex:indexPath.row];
Instead of
ClassName *class = [ClassName alloc] init];
class = [arrayOfSomething objectAtIndex:indexPath.row]
You need to show the associated code before anyone can assist. Otherwise we are just guessing.
Show how you are initializing ClassName.
Do not alloc init your Bean class, instead use following method to set Bean:
-(void)setBean:(YourBeanClassName *)obj
{
objBean = obj;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With