I am new to ARC and I have an object that has some inner classes as members. In the init method, I want to allocate new objects for them.
ClassA.h
#import "ClassB.h" @interface ClassA : NSObject @property (assign) ClassB *member; @end
ClassB.h
@interface ClassB : NSObject @property (assign) NSString *name; @end
ClassA.m
@synthesize member = _member; -(id)init { _member = [[ClassB alloc] init]; }
But I get errors "Assigning a saved object to unsafe properties." I was browsing websites and did not see any other information about this particular warning. It compiles, but receives an exception for safe execution at runtime.
Ronaldo nascimento
source share