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

sdkIQ for iPhone
($4.99)

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Dual Matches
($0.99)

Calcuccino Programmers' Calculator
($2.99)

SDKtoday
(free)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-09-2010, 07:48 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 4
Default Navigate a series of Screens/Views? (like a Powerpoint)

First off, great site… It's given me the push to reallt delve into iphone dev (which for an artist is damn scray). I've researched this topic, and have lots of 'pieces' but I can't seem to bring it together. Any help would really be appreciated.

The simplest example would be a simple Powerpoint presentation. Image on the background of each view (subview), a text layer on top, and two buttons(prev/next) to flip from view to view. I've seen lots of examples for 2 screen flips (like a Utility app), but what if you had 20 screens/views to flip thru?

There's more that I'd want to do, but I can research adding narration, transitions…blah blah blah. My guess is, the answer is somewhere between NSImageViews and UIViews. But it isn't gelling.

Thanks,

Brendang
outtoplay is offline   Reply With Quote
Old 02-09-2010, 11:43 AM   #2 (permalink)
mlo
Registered Member
 
mlo's Avatar
 
Join Date: Jun 2009
Location: Ireland
Posts: 116
Default

Ok the simplest answer would be something like this.

Use a UIimageview a uitextview and two buttons. Load your images into an array, same for your text strings; run this from ViewDidLoad. Code would go something like this:

Code:
imageTable=[[NSMutableArray alloc] init];

[imageTable addObject: @"image1.png"];
[imageTable addObject: @"image2.png"];
etc
Hook an IBaction to each of the buttons one to increment one to decrement.

Code would be like this (this would work for 9 images in the array, could probably recode it to use [array count] instead of a hardcoded value but it works):

Code:

- (IBAction)Increment_image:(id)sender{

if (imagenumber==8) 

{

imagenumber=0;

}

imagenumber=imagenumber+1;

[partimage setImage:[UIImage imageNamed: [parttable objectAtIndex: imagenumber]]];

}
hopefully thats enough to get you started off.

Of course alternatively you could use a navigation controller with a different viewcontroller for each view, or subclass a viewcontroller with your UI elements in it and just call the new class each time you want to display a new slide but both are probably unnecessarily complex for your application..

Last edited by mlo; 02-09-2010 at 12:52 PM.
mlo is offline   Reply With Quote
Old 02-10-2010, 07:51 AM   #3 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 4
Default

Hey Mio,

Sorry for the delay in thanking you, I teach thesis animation in NYC on Tuesdays. I appreciate you giving me a solid start in putting this together.

From all the tuts I've done, I can get a bunch of the discreet parts but I think true experience is how one gets good at gelling them together.

Beers on me if you're ever in the Snowy Apple...

Brendang.
outtoplay is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Advertisements
» Stats
Members: 41,862
Threads: 49,770
Posts: 213,057
Top Poster: BrianSlick (3,139)
Welcome to our newest member, futurevilla216
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:03 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0