How to copy NSString data to my custom object’s NSString property?
I have an object question with NSString *text and KDoctor *doctor properties.
KDoctor is an object with two properties: NSString *name and UIImage *photo.
self.question.doctor.name=@"abc";
NSLog(@"doctorname: %@", question.doctor.name);
Output is:
doctorname: (null)
Why? How could I solve this problem?
my guess is that
question.doctor != self.question.doctoror
question == nilor
question.doctor == nil