samedi 30 juillet 2016

How to click button and move on next page?

I have UIScrollView with pagingEnabled=YES. I want to scroll in next page on button click but my code doesn’t work. When I press on button once I move to next page but when press again I move in the end page. How to click button and move on next page?

-(IBAction)aMethod:(id)sender
{
int i;
i = i+1;

[scroller setContentOffset:CGPointMake(scroller.frame.size.width*i, 0) animated:YES];
}

Aucun commentaire:

Enregistrer un commentaire