ios - loading a new nib file after user approves -


in application have 3 nib files. in first nib file have uiwebview redirects user vimeo page user authentication app, after user presses allow in link control transferred app, after display list of videos designed new nib file , third nib file play video user selected. not able load second nib file after user approval.i tried these approaches after user presses allow , got access. removed uiwebview tried load second nib using uinib , nsbundle nib dint appear, have tried creating separate class new nib , assigning files owner of nib newly created class approach dint work. tried using appdelegate loading code. write code :

- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions{  nslog(@"in app delegate show ui");  custominterface *ci = [custominterface new];  [[nsbundle mainbundle]loadnibnamed:@"interface" owner:ci options:nil];   uilabel *lab = [ci valueforkey:@"label"];  [self.window.rootviewcontroller.view addsubview:lab];  lab.frame = cgrectintegral(lab.frame);   uitableview *tab = [ci valueforkey:@"table"];  [self.window.rootviewcontroller.view addsubview:tab];  tab.frame = cgrectintegral(tab.frame); return yes; } 

but using intital nib , second nib both loading when app launched want load second nib after user authentication. have tried many other techniques creating new delegate , class second nib, creating new method showsecondnib() in default appdelegate none of them worked. can me this. thank you.

in app delegate use load nib bundle:

self.viewcontroller = [[uistoryboard storyboardwithname:@"yourstoryboardname"  bundle:nil] instantiateviewcontrollerwithidentifier:@"youviewcontrollername"]; 

this should load nib current view.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -