I am newbie to programming. Any help could be greatly appreciated.
It's in AddViewController.
NSLog(@"Am Currently at %@",locatedAt);
DetailsOfPeopleViewController *details=[DetailsOfPeopleViewController alloc];
details.testAddressStr=[NSString stringWithFormat:@"%@",locatedAt];
details.testAddressStr
is displaying the value here, but it's not passing this value to DetailsViewController.
The value of locatedAt
is displaying in the AddViewController. When I try to display this value in UILabel of DetailsViewController class it's not displaying that value in the label.
In DetailsViewController.h:
NSString *testAddressStr;
@property(nonatomic,strong) NSString *testAddressStr;
@property(nonatomic,retain)IBOutlet UILabel *addressLabel;
In DetailsViewController.m:
[addressLabel setText:testAddressStr];
Am also trying it this way:
addressLabel.text=[NSString stringWithFormat:@"%@",testAddressStr];
I'm not really getting where I'm making a mistake...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…