I have some code that is called when I click the next button on a toolbar.
Code:
MainViewController* mv = (MainViewController*)self.navigationController;
UserDetails* user = mv.userDetails;
user.name = [lblName text];
user.address = lblAddress.text;
user.address = lblAddressCont.text;
user.county = lblCounty.text;
user.name becomes out of scope when AI step over user.name = [lblName.text];
UserDetails is declared as below:
Code:
@interface UserDetails : NSObject {
NSString *name;
NSString *address;
NSString *addressCont;
NSString *county;
NSString *postcode;
NSString *dateOfBirth;
NSString *homePhone;
NSString *mobilePhone;
NSString *email;
}
@property (nonatomic, retain) NSString* name;
@property (nonatomic, retain) NSString* address;
@property (nonatomic, retain) NSString* addressCont;
@property (nonatomic, retain) NSString* county;
@property (nonatomic, retain) NSString* postcode;
@property (nonatomic, retain) NSString* dateOfBirth;
@property (nonatomic, retain) NSString* homePhone;
@property (nonatomic, retain) NSString* mobilePhone;
@property (nonatomic, retain) NSString* email;
-(id)init;
-(NSString*)getTextToSend;
@end
Does anybody know why this is?