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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-09-2010, 12:43 PM   #2 (permalink)
mlo
Registered Member
 
mlo's Avatar
 
Join Date: Jun 2009
Location: Ireland
Posts: 117
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 01:52 PM.
mlo is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,854
Threads: 89,223
Posts: 380,680
Top Poster: BrianSlick (7,129)
Welcome to our newest member, ijhetro
Powered by vBadvanced CMPS v3.1.0

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