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 > iPhone SDK Development Forums > iPhone SDK Development

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 01-08-2012, 05:28 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2012
Posts: 8
chris Good is on a distinguished road
Default NSArray next and previous button

I have two buttons. One button shows the next image in a NSArray, but not only the next image in order but the button shows a random image from this array every time pressed. My second button is what I need help with Its a previous button that will display the previous image shown in the view every time pressed sort of like a slide show. I want to know how to make this previous button. I been told to Add an array property and each time the next method is fired, have it push the resulting image into the array, then the previous method would just recall images from the array, but I dont know how to implement this in code I am new at this. Please if anyone can supply some code that will make this previous button do this


-(IBAction)nextbuttonid)sender;
{
int ptr = rand() % 6;
NSArray *images = [[NSArray alloc] initWithObjects:@"Americans.png",@"Approach.png",@ "Arianny.png",@"Atoms.png",@"Australia.png",@"Aver age.png",nil];

}


above is my next button how will i make my previous one??
chris Good is offline  
Closed Thread

Bookmarks

Tags
button, ios, previous button, uiimage

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
» Online Users: 391
10 members and 381 guests
Atatator, buggen, guusleijsten, j.b.rajesh@gmail.com, morterbaher, QuantumDoja, sacha1996, Sami Gh, tim0504, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,674
Threads: 94,122
Posts: 402,907
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Atatator
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:36 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0