mercredi 4 mars 2015

iOS XHTwitterPaggingViewer : Difference between two reference of storyboard

Can someone tell me what is the difference between two line, both are reference the View controller.


1.




UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
XHTwitterPaggingViewer *twitterPaggingViewer = (XHTwitterPaggingViewer *)navigationController.topViewController;


2.




XHTwitterPaggingViewer *twitterPaggingViewer = [storyboard instantiateViewControllerWithIdentifier:@"XHTwitterPaggingViewer"];


If I am go with first then my app work perfect, other on second it will crash.


Thanks,




Aucun commentaire:

Enregistrer un commentaire