Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 62

Bertrand
Apple Fan
Profile
Posts: 163
Reg: Dec 26, 2012
saint-quentin f...
4,680
07/04/14 01:07 AM (10 years ago)

Scringo menu with Buzztouch

Hi everyone, With your help I managed to integrate Scringo in my application, I also managed to customize the menu to be able to view Scringo plugins. But I am having a little problem. When I click once on a menu tab, the plugin loads fine, but when I click again on the second tab in the top nav bar I have the name of the plugin but I have no content that is displayed. I have two errors that appear in the console : - 2014-07-04 09:51:08.151 testplugins[1412:60b] nested push animation can result in corrupted navigation bar - 2014-07-04 09:51:08.504 testplugins[1412:60b] Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted. This is the code I added to navigate from a custom URL : -(void)MoreForMeClicked:(NSNotification *)aNotification { // My or your code NSDictionary *menu = [aNotification userInfo]; NSString *nomMenu = [menu objectForKey: @"customButtonId"]; NSString *loadScreenItemId = nil; NSString *loadScreenNickname = nil; BT_item *screenObjectToLoad = nil; if ([nomMenu isEqualToString: @"menuJeux"]) { loadScreenItemId = @"77A4861A80440C12F49209E"; } else if ([nomMenu isEqualToString: @"accueil"]) { loadScreenItemId = @"FDC7970FE0E5A3FF00835B0"; } else { NSLog(@"Le menu sélectionner n'existe pas !!!"); } testplugins_appDelegate *appDelegate = (testplugins_appDelegate *)[[UIApplication sharedApplication] delegate]; screenObjectToLoad = [appDelegate.rootApp getScreenDataByItemId:loadScreenItemId]; BT_item *thisMenuItem = [[BT_item alloc] init]; if([loadScreenItemId length] > 1){ screenObjectToLoad = [appDelegate.rootApp getScreenDataByItemId:loadScreenItemId]; }else{ if([loadScreenNickname length] > 1){ screenObjectToLoad = [appDelegate.rootApp getScreenDataByNickname:loadScreenNickname]; }else{ if([thisMenuItem.jsonVars objectForKey:@"loadScreenObject"]){ screenObjectToLoad = [[BT_item alloc] init]; [screenObjectToLoad setItemId:[[thisMenuItem.jsonVars objectForKey:@"loadScreenObject"] objectForKey:@"itemId"]]; [screenObjectToLoad setItemNickname:[[thisMenuItem.jsonVars objectForKey:@"loadScreenObject"] objectForKey:@"itemNickname"]]; [screenObjectToLoad setItemType:[[thisMenuItem.jsonVars objectForKey:@"loadScreenObject"] objectForKey:@"itemType"]]; [screenObjectToLoad setJsonVars:[thisMenuItem.jsonVars objectForKey:@"loadScreenObject"]]; } } } //load screen... BT_viewController *parentScreen = [appDelegate getViewController]; [parentScreen loadScreenObject:screenObjectToLoad]; } Thanks for your help ;)
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/04/14 10:01 AM (10 years ago)
There's a lot easier way to load a screen from a plugin: [self loadScreenWithItemId:@""]; or [self loadScreenWithItemNickname:@""];
 
Bertrand
Apple Fan
Profile
Posts: 163
Reg: Dec 26, 2012
saint-quentin f...
4,680
like
07/07/14 12:37 AM (10 years ago)
Hi chris, thank you for the line of code that simplifies what I put but unfortunately I always have this error is present :/
 
Bertrand
Apple Fan
Profile
Posts: 163
Reg: Dec 26, 2012
saint-quentin f...
4,680
like
07/07/14 01:54 AM (10 years ago)
In fact it is with the plugin custom URL I have this error. When I click once on the menu, the plugin appears fine but when I click a second I have the following errors : - 2014-07-04 09:51:08.151 testplugins[1412:60b] nested push animation can result in corrupted navigation bar - 2014-07-04 09:51:08.504 testplugins[1412:60b] Finishing up a navigation transition in an unexpected state. EDIT : even with a custom HTML I have these error
 
Bertrand
Apple Fan
Profile
Posts: 163
Reg: Dec 26, 2012
saint-quentin f...
4,680
like
07/07/14 05:50 AM (10 years ago)
to be more precise I have the Nav Bar changing (you can see the plugin name change), but the content does not appear I have a blank page.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.