I have an IBAction that when triggered calls another method in a different view controller ( APICallsViewController). I\'m looking to also send that method an NSString (m
do this code in APICallsViewController.h
@interface APICallsViewController : UIViewController{
NSString *strMessage;
}
@property(nonatomic,retain) NSString *strMessage;
@end
APICallsViewController.m
@synthesize strMessage;
- (void)viewDidLoad {
Nslog(@"%@",strMessage);
}
-(IBAction) someMethod{
APICallsViewController *apiViewController = [[APICallsViewController alloc] init];
[self.navigationController pushViewController:apiViewController animated:YES];
NSString *message = [NSString stringWithFormat:@"Check out %@", nameLb.text];
apiViewController.strMessage=message;
[apiViewController apiGraphUserCheckins];
[apiViewController release];
}