Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 10    Views: 143

nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
04/28/13 08:28 AM (12 years ago)

New plugin: Advanced Quiz

iOS 6. https://www.buzztouch.com/plugins/plugin.php?pid=ABA567A098CB794C4191E81 NAD Advanced Quiz -------------------------------------------------------------------------------- An advanced mutiple choice quiz plugin for Buzztouch. This plugin supports a few features that the free Buzztouch plugin does not. The text views for the question and answers are dynamically sized. This means that the text view size is based on the amount of text inside of it. The view size changes when going from one question to the next. With this plugin you no longer need to worry about the amount of text in your quiz, or the font size. This plugin uses a scroll view to display the questions and answers. Because the text views can resize themselves there is no guarantee that the questions and answers will fit on the screen. A scroll view is used to make sure the app user can see the entire question. In the free quiz plugin the question text and question image are in the same view (or box). This plugin uses separate views for the question text and image. The plugin will also dynamically insert and remove the image view based on whether or not each individual question has an image or not. Supports device rotation. When the device is rotated the views will resize themselves to fit the screen. This includes the image view. Up to 4 different image sizes can be used depending on the device (iPhone or Ipad) and its orientation (portrait or landscape). The plugin uses a feature called Autolayout. Autolayout is new in iOS 6 and will not work with older versions if iOS. Some older devices are supported so long as they have been upgraded to use iOS 6. No, Android is not YET supported by this plugin. Yes, I do plan do add support for Android to this plugin. Youtube: https://www.youtube.com/watch?v=DybFoBRw71o ----------------------------------------------------------- Edit: Couple of thingsI forgot to put in the readme is the sharing options for the final score and gamecenter integration in the Control Panel. Share score via Email Share score via FaceBook Share score via twitter Shareing score on Gamecenter. Can all be set up in the control panel. No more hacking on the code, like the free plugin. Scringo integration isn't set up yet. This will have to wait for another version. The plugin also has gamecenter integrated into the control panel.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/28/13 10:01 AM (12 years ago)
Nice work, Nicholas! I had a glimpse into how much hard work you did during the plugin review. Thanks for keeping an eye on our Android brethren. For the next version, consider a paged view for the image area. That allows the Professor to offer different perspectives of the topic by presenting a collectin of images that can be swiped left-right. Congratulations! :-) -- Niraj
 
Otatech
Code is Art
Profile
Posts: 80
Reg: Jul 18, 2012
Rome
800
like
04/28/13 10:22 AM (12 years ago)
Is it possible to use videos instead of pics? Ciao :-)
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/28/13 02:14 PM (12 years ago)
comprehensive and well done :) Cheers! -- Smug
 
DryFrog
Lost but trying
Profile
Posts: 42
Reg: Jun 26, 2012
São Paulo
4,620
like
04/28/13 02:33 PM (12 years ago)
I've been waiting so long for this plugin and it will definitely enhance our possibilities with quizzes on BT. Very nice work, very comprehensive. Congratulations, @nadthevlad! :) dryFrog
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
04/28/13 03:29 PM (12 years ago)
Thanks Guys! @otatech The plugin is not set up for video. At least not via the control panel. I am sure it can be done by hacking on the code. I will be sure to keep this in mind as I work on this plugin in the future. @Niraj - Thats a great idea. Multiple images had never crossed my mind. I will definitely put it on the plugins roadmap.
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
04/28/13 10:32 PM (12 years ago)
Congratulations, @NadtheVlad! I see this as particularly useful for technical quizzes in apps. Plus, since it rotates on the iPad, it provides a much improved iPad experience.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
04/29/13 06:35 AM (12 years ago)
Awesome. Looks very nice. Love the smooth rotation. How much time in dev to dela with the larger screens and rotations vs code logic. In other words, how much extra time making it work for ipad? an extra week, 2 weeks, an hour? That seems like the big roadblock on iOS now, the larger device sizes... If this wa sjust an iPhone only screen, would this have been easier to develop? Nice work, hope it sells well. Plan to look at it closer myself sooner than later.
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
04/29/13 09:57 PM (12 years ago)
@ATRAIN The amount of time it took is kind of subjective. With a full time job I can only put in so many hours per week on projects like this. The first time setting up the layout seemed like it took forever. I had to learn everything from scratch. When I do it again the layout should only take a fraction of the time. For me the total project time was 5 months. It was probably 1-2 months at 10-20 hours a week just on the layout. For my next project I think I can cut down the time to do the layout to a week (in my free time outside of work). The difference being that I know what I am doing now. Apple's Autolayout (new as of iOS 6) makes it easier to deal with different screen sizes. Autolayout is a big step forward for Apple and iOS. The only drawback is the lack of backward compatibility. "If this was just an iPhone only screen, would this have been easier to develop?" - Yes but only slightly. Autolayout does most of the heavy lifting. If I did NOT have Autolayout it would have been a little harder. http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2 https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AutolayoutPG/Articles/Introduction.html Setting things up for iphone and ipad is a matter of setting up two sets of variables for the screen elements. Then using an if statement in the viewDidLoad method to check for the type of device and setting the variables accordingly. All the layout info goes inside its own function (in BT david gives us the -(void)layout; method). This gets called at the end of viewDidLoad. This function also gets called on device rotation in the willRotateToInterfaceOrientation method. Its important to keep track of the device orientation for rotating. But there are some very specific functions and variables for doing this.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
04/30/13 06:54 AM (12 years ago)
Thanks for the summary, similar situation. Finding time to code is tough, esp with kids around - and the Stanley Cup run about to start and the Bulls still going.... That's about what I expected. The actual quiz code was less work than the layout then. crazy. I need to dig into the autolayout stuff soon. Funny everyone gripes about Android device fragmentation and Apple is just as bad now IMO. Great Wenderlich to look at, hadn't seen that but will be studying it. Thanks. I usually build for iphone only because the layout stuff is getting complex. It used to be seperate iphone and ipad versions of the same app just to cope with this. Now everyone thinks Universal. That was one of my main attractions to ios - that small screen you could layout quickly. So many great controls out there to use now and they all have layout issues. You'd say you prefer the autolayout to the seperate xib method? Can't wait to grab this thing from the market and take a look, I know you put a TON of work in here and it really looks great :)
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
04/30/13 09:10 AM (12 years ago)
"You'd say you prefer the autolayout to the seperate xib method?" I am not sure it the separate xib method is good or bad. Don't have enough experience with that. The advantage of autolayout is not having to define elements based on their x/y position and their x/y size. example: using cgrect() Autolayout works with xibs or it can be used programmatically. I found autolayout easier to work with programmatically .
 

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.