ios - Adding SubView to window close the app in ipad -


i have ipad application in want add splitviewcontroller once loginviewcontroller loaded , user press sign in button following notification works,but happens adding following code close app , again open shows.

 -(void)actionnotificationdata:(nsnotification *)notification {   [self.loginviewcontroller removefromsuperview];   uiwindow* window = [uiapplication sharedapplication].keywindow; if (!window)      window = [[uiapplication sharedapplication].windows objectatindex:0]; [[[window subviews] objectatindex:0] addsubview:splitviewcontroller];     } 

 [self.loginviewcontroller removefromsuperview]; 

removefromsuperview expecting uiview's subclass , passing uiviewcontroller.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -