I'm using MMDrawerController And want passing data from one view controller to Another view controller as(HomeViewController to DetailViewController)
HomeViewController view controller
Category *categoryItem = [category objectAtIndex:cellIndex];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
DetailsViewController * centerVC=(DetailsViewController*)[storyboard instantiateViewControllerWithIdentifier:@"DetailsViewController"];
centerVC.catName= categoryItem.name ;
centerVC.catUrl=categoryItem.url;
UINavigationController * centerNav=[[UINavigationController alloc]initWithRootViewController:centerVC];
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
appDelegate.drawerController.centerViewController=centerNav;
And In ViewDidLoad We Want access property as DetailsViewController view controller DetailsViewController.h
@property (nonatomic,weak) NSString* catName;
@property (nonatomic,weak) NSString* catUrl;
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.title = [_catName uppercaseString];
}
But some time _catName has value nil.
Is there anything wrong ,If Then plz suggest.
If problem with defining properties weak then what type property I choose for view controller property.