iphone - How to change UIImageView image on previous and next button click -
iphone - How to change UIImageView image on previous and next button click -
i have nsmutablearray 10 different images. displaying first 3 images array. want display next images array, when next button click. previous images when previous button clicked. able display different images when next button gets clicked, comes on lastly uiimageview.
- (ibaction)nextimage:(id)sender { nslog(@"count :%d%d",count,coursearry.count); if ((count+1) > coursearry.count) { count = 0; } starimageview.image = [uiimage imagenamed:[coursearry objectatindex:count]]; count++; } -(ibaction)previousimage:(id)sender { if ((count-1) > coursearry.count) { count = 0; } starimageview.image = [uiimage imagenamed:[coursearry objectatindex:count]]; count++; } iphone
Comments
Post a Comment