Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-25-2009, 07:56 PM   #13 (permalink)
AEDave
New Member
 
Join Date: Mar 2009
Location: Silicon Valley, CA
Posts: 135
AEDave is on a distinguished road
Default

jin8k,

There's a few things that come to mind. First off, using the UIToolbar is different from using buttons... I haven't really played around with them much, but I think with a little searching you can find out how to trigger the action based upon what button the user presses (it's different from how buttons are treated, but not by much).

Regarding storing the information after you find out what someone pressed, I'd suggest glancing at this video tutorial: Welcome to the iPhone Development Central Website!

It covers NSMutableArray which is a modifiable array you can use to dynamically store your answers. I'm assuming that what you're trying to do is get a user to the end of the quiz before telling them how many they got right or wrong. That just means you'll need to do something simple at the end like:

Code:
i = 0
rightanswers = 0
for i++{
 if ((questionArray objectAtIndex:i) == (answerArray objectAtIndex:i)){
    rightanswers = rightanswers++;
  }
}
AEDave is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,631
Threads: 94,089
Posts: 402,802
Top Poster: BrianSlick (7,990)
Welcome to our newest member, hanhaursh7
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:07 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.