Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 8    Views: 82

Uelsimon
Lost but trying
Profile
Posts: 272
Reg: Mar 25, 2012
NYC
4,470
12/29/13 06:28 PM (11 years ago)

How to create a multi-screen custom plugin?

ok.. I admit I may be going about this all backwards, but I’m thinking about getting my first custom plugin under my belt..or at least part of the way in preparation of Buzzcon 2014 (YEAY!!) But since the tutorials I’ve seen have mostly been for building from scratch using IB, or doing a simple page, I thought I’d ask how the process changes for a multi-screen plugin. for example, If I wanted to an alarms plugin with the following views: 1) List of alarms (with native edit, add, delete, turn on/off functionality) 2) Alarm detail page where you can modify the selected alarm settings (time, day, repeat, sound, etc) so in my mind that would require at least 2 sets of (class) files. Lets call them: 1) alarm_list.m / alarm_list.h 2) alarm_detail.m / alarm_detail.h now if I were to create this for my project, and I was going to use the custom plugin (btw I don’t see that in the market anymore..so should I modify something like the XIB button plugin?)… would I need to create 2 custom plugins (one per screen?)..or just one for the main screen? hope that’s not too confusing an ask thanks € P.S. once I get the hang of this..I’m totally registering as a BTDev. :)
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/29/13 06:46 PM (11 years ago)
Multi "Screen", or Multi "View" ? There's a slight difference. I'd suggest one plugin per 'screen', but multiple views in the same plugin should be no problem. the "List" of alarms would be your 'main' view. That would probably be a xib file (A xib is easier, but it doesnt have to be a xib… you can do it all in code if you prefer) the "Edit" section would be a temporary view. You could use a bonafide "xib" file, or you could use an alertView… depends on you. Start off using the 'Blank' plugin (https://www.buzztouch.com/plugins/plugin.php?pid=288024B0A6DB1050FFB0EC8) and modify that to your needs. Send an email to [email protected] and have your devID registered so you can 'create' a new plugin later, when you're closer to finish… Check out David's video 'how to build a plugin' to get the basics on how to create and 'tie' a xib to your class file, and how to 'link' objects in your xib to properties of your class. http://www.youtube.com/watch?v=OJrMVTn8z0s There is also a session of the BT Plugin Developers where I show you how to connect your control panel to your iOS/Android project: https://www.buzztouch.com/account/events.php Look for the December 4th Presentation. The sample plugin I used for the demo is here: https://dl.dropboxusercontent.com/u/115208762/SW_forTestOnly.zip And remember: Persistance and Patience are the two biggest skills you'll need. The rest will come. Cheers! -- Smug
 
Uelsimon
Lost but trying
Profile
Posts: 272
Reg: Mar 25, 2012
NYC
4,470
like
12/29/13 06:50 PM (11 years ago)
Yes... I believe it is multi-view. Thanks Smug! I'll be sure to check these out... and as for P+P.... I deplete those a lot...but they replenish every...I'd say 2-4 wks :) €
 
Mobario Man
Android Fan
Profile
Posts: 58
Reg: Jul 15, 2013
Zurich
880
like
12/29/13 11:41 PM (11 years ago)
Hi There, If you are looking for split screens or multitasking, try out our in-app sdk which will enable your users to multitask while in your app. We also have a promotion now, any developer that integrates our sdk, we offer free advertising to our 17m users worldwide. Check us out: www.MOBARIO.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/30/13 06:48 AM (11 years ago)
Multi-screen or multi-view - that is a big difference! Every plugin has multiple views of course. A button, an image, a label ... these are all views in the programming world. But a plugin can easily have multiple screens as well. (Check out my checklist plugin as an example). Here's how I create plugins these days. I begin by creating a new class file in XCode inside an existing Buzztouch project. I set its parent to BT_viewController, then I start adding in my code. If you need a xib file, simply create one with the same name as your class and it will automatically work. I then manually edit the bt_config.txt file in Xcode to add the screen to my app, and take out the dataURL from that file so it won't try to override it from the control panel. Once I get everything working right, I then create a plugin using the Buzztouch 'create-a-plugin' tool, and put it all together.
 
Uelsimon
Lost but trying
Profile
Posts: 272
Reg: Mar 25, 2012
NYC
4,470
like
12/30/13 07:46 AM (11 years ago)
@Chris1 ok... not to flip-flop... but yes I do believe i mean multi-screen too. your checklist plugin is the perfect example. Any chance you can record a video/tutorial when you do your next multi-screen plugin (I know you are working on one soon if not already) :) It doesn't need to be about the details of writing the code as much as the setting up of the components. (i.e. you can copy and paste in the code for the screens, but focus on how it all ties together. e.g. how you put the checklist plugin together. yes..cause I'm lazy to sit and figure it out...ok not really... but this way i can thow it up on the tv and watch while I feed my 1yr old. :) (I know..it's all about me .... and all the other aspiring custom plugin maker folks out there) Thanks in advance :) (hoping you just said "sure") €
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
12/30/13 10:20 AM (11 years ago)
Another approach is to start with an existing project from GitHub.com, CocoaControls.com, ManiacDev.com, CocoaPods.org I bring an open-source project's class files into an existing BT app. Then convert them into being the children of BT_viewController. Look at Chris' Checklist plugin. I am fairly sure he leveraged an open-source project. Compare the original with the adaptation by Chris. The Tumblr one is another one he adapted for BT. -- Niraj
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/30/13 10:23 AM (11 years ago)
Niraj - actually the checklist plugin was one I built myself from the ground-up. :) I did start with another project that someone else created a while back outside of Buzztouch, but pretty much the only similarities between that and this one are the design concepts. Tumblr Menu, on the other hand, is an open-source project.
 
Uelsimon
Lost but trying
Profile
Posts: 272
Reg: Mar 25, 2012
NYC
4,470
like
12/30/13 10:56 AM (11 years ago)
yes, starting from a component was what I was thinking of doing. so ya I can check into the tumblr one and see what was done. and see if i can reverse understand what is going on. thank a lot guys €
 

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.