2 Jan 2017

VIewController instantiation PushViewController(With NavigationController)...

when we want use one viewController in another viewController first we have to instantiate that we controller with identifier in presentViewController.(first import view controller in present file and then fallow below code.)
now we can use for accessing variables of viewController in presentviewController and we can push the viewcontroller from present viewController.


{

DataTableViewController *viewC = [self.storyboard instantiateViewControllerWithIdentifier:@"DataTableViewControllerID"];
viewC.array1=self.array2;

       [self.navigationController pushViewController:viewC animated:YES];

}

No comments:

Post a Comment

Recent Posts

Codable demo

Link: https://www.dropbox.com/s/kw7c1kgv1628bh7/codableDemo.zip?dl=0