Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 75

Nelson
Aspiring developer
Profile
Posts: 57
Reg: Jun 06, 2013
Viseu
2,220
11/09/15 11:14 AM (9 years ago)

storyboard xib file blank screen plugin

I'm using the Storyboard Plugin. I need to open several different screens of storyboards. But I can not link a new screen for a new .xib file. The Plugin only opens the BTM_story.xib file. Is it possible to open another .xib file? I've tried changing the JSON but is not allowed to change the itemType. Also wanted to know if it is possible to open one Storyboard directly without having to go through a .xib file. Can I can put some code in the Blank Screen plugin to open a specific storyboard?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/15 12:05 AM (9 years ago)
Usually you add additional screens within the same storyboard, and link them within the same storyboard controller. You may want to glance through this tutorial: http://www.raywenderlich.com/113388/storyboards-tutorial-in-ios-9-part-1 and let us know if that helps any. Cheers! -- Smug
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
11/12/15 09:52 AM (9 years ago)
Great source Smug! Isn't that Swift though? LA
 
Nelson
Aspiring developer
Profile
Posts: 57
Reg: Jun 06, 2013
Viseu
2,220
like
11/13/15 06:32 PM (9 years ago)
I solved the problem this way. I am using the xib_button_menu where I create a new copy of the original xib with a different name "teste.xib". Within the xib_button_menu I add a storyboard file call "teste.storyboard". In "teste.xib" I change it according to my needs. As an example delete all buttons, and add a button with my preferences and link it to m_xib_button_menu.h named it for example testebutton. In jm_xib_button_menu.m I put on top "@synthesize testebutton;" and add this code which I connect to testebutton. We have to change the name "teste" in the code for the name of the desired storyboard. // When the button is pressed IBAction in the XIB file, this code will push to the storyboard with the name "test". - (IBAction) pushToStory: (id) sender {          [BT_debugger showIt self theMessage: @ "pushToStory Has Been called and is on the phone."];          UIStoryboard * Storyboard = [UIStoryboard storyboardWithName: @ "test" bundle: nil];     UIViewController * initViewController = [storyboard instantiateInitialViewController];          [self.navigationController pushViewController: initViewController animated: YES];      } If you want other storyboard repeat all over again. You have to change the name of - (IBAction) pushToStory: to another for example - (IBAction) pushToStory2: and link to the button that is intended. This way it is possible to choose the desired .xib in BT with XIB Button Menu. And from it go to a new storyboard It can be an excellent upgrade to XIB Button Menu to be able to a choose a storyboard.
 
Nelson
Aspiring developer
Profile
Posts: 57
Reg: Jun 06, 2013
Viseu
2,220
like
11/13/15 06:35 PM (9 years ago)
I did refresh.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
11/13/15 06:41 PM (9 years ago)
Awesome! LA
 

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.