ios - Can't pass object by reference to another view controller -
i trying pass object reference (or pointer object) view controller.
how trying pass it:
secondviewcontroller* ctrl = [[secondviewcontroller alloc] initwithnibname:@"secondviewcontroller" bundle:nil andparam:&self.sharedlocationhandler];
and init @ second view controller:
- (id)initwithnibname:(nsstring *)nibnameornil bundle:(nsbundle *)nibbundleornil andparam:(ttlocationhandler**)aparam { [self.sharedlocationhandler.locationmanager startupdatinglocation]; return self; }
error getting:
address of property expression expected
what did wrong here?
you cannot not pass pointer property properties getter-setter methods... pass pointer variable... check answer more details
Comments
Post a Comment