Nick Langley
Apple Fan
Profile
Posts: 288
Reg: May 08, 2012
Birmingham, Uni...
11,580
12/10/12 05:24 AM (13 years ago)

Using Storyboard with Plugins

So i created a new plugin, decided that i wanted to use a storyboard in my Buzztouch application. I can get Xib's to work no problems, but without a file's Owner in StoryBoard i can't seem to get it working..? Any Ideas? Thanks in advance. :) edit: Still uber stuck with this, been pulling my hair out all day!
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
12/10/12 02:42 PM (13 years ago)
Create storyboard name it same as class files of custom plugin Highlight the view controller make custom class same as class files (as with xib} Give that bad boy a storyboard id (just underneath) Add this code to your .m file under view will appear UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"yourcustomclass" bundle:nil]; UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"storyboardID"]; [vc setModalPresentationStyle:UIModalTransitionStyleCrossDissolve]; [self presentModalViewController:vc animated:NO]; Voila
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
12/11/12 08:02 AM (13 years ago)
nice. thanks for the tip. curious to see how this works with the BTnavigation controller.
 
Nick Langley
Apple Fan
Profile
Posts: 288
Reg: May 08, 2012
Birmingham, Uni...
11,580
like
12/11/12 08:32 AM (13 years ago)
Haveant had chance to try this, looks right though. I still don't understand why you don't have Files Owner for each view?
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
12/11/12 08:35 AM (13 years ago)
@atrain53 it doesn't react very well at all. You have to program every nav bar seperately on each controller in the storyboard, but they can all be linked into the same class and modified using the buzztouch control panel.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
12/11/12 08:51 AM (13 years ago)
I suspected something like that. I guess I could see using a storyboard to link a couple of views together - but getting back to the BT navigation in an app was tricky enough with XIB's... I didn't have much interest trying to figure out using Storyboards - but there are a couple of VC's that use them I was tinkering with. Nice to have the option to use SB's if they will work. Thanks! is that the method then - you just add the BT_viewUtilities configurebackgroundandnavbar statement on each screen then inside a viewwillappear? and hows your icarousel menu going? I've got some childitems set-up now, but it doesn't like to take image names from JSON values however! odd...
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
12/11/12 09:09 AM (13 years ago)
I'm waiting for david to get back to me. I'm working on about six different plugins at the moment, there's no rush, store not open till january. The navbar will not marry as a view in xib file is controlled by the class, where as the view is built into the view controller so you can't use the navbar code. you have to do it separetly will still link to control panel . I wouldn't advise using the storyboard as a plugin either as it's not backward compatible, plus it's quite complicated to get the classes. I have used it as a instruction manual for aurasma.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
12/13/12 07:45 AM (13 years ago)
I am a bit concerned of the difficulty since Storyboards will be used even more in the future. I have asked David Book to share his crystal ball with us on this topic.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/13/12 12:55 PM (13 years ago)
@MacBoy: Crystal ball - funny. I'm not exactly sure what you guys are asking here. The Storyboard docs are here, for reference: http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/UsingViewControllersinYourApplication/UsingViewControllersinYourApplication.html The idea is that you can use Storyboards to connect screens and their data together. In most cases, an app either "Users Storyboards" or "Does not use Storyboards." Naturally there are cases where Storyboards are intermingled in other application UI parts without specifying the Main Storyboard in your app's plist (application settings). Like anything else in programming, there are countless ways to use, or avoid this concept. I'm happy to lend some thoughts on specific questions?
 

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.