0

i have a scroll View which contains 10 images on a row. the fiarst 5 items will display on the screen at first time the remaining 5 images will display only after the scroll.

However ,I need to display only one image per each scroll.

Details


i have 10 images in my scroll view on a row.
1st,2nd,3rd,4th,5th images will dispaly at the firt time.
when first scroll is done , i need to dispaly the 2nd,3rd,4th,5th,6th images
after next scroll,i need to dispaly the 3rd,4th,5th,6th,7th images
after next scroll,i need to dispaly the 4th,5th,6th,7th,8th images etc.

is there any way to do it? can any one provide me a good way.

Thanks

adrian
  • 4,574
  • 17
  • 68
  • 119

3 Answers3

1

See the paging property in UIScrollView class.

Also you can stop scrolling in - (void)scrollViewDidScroll:(UIScrollView *)scrollView when image 6 will appear. After second scroll stop when image 7 will appear etc.

beryllium
  • 29,669
  • 15
  • 106
  • 125
  • if we set paging property is True, it will didplay the next 5 images after scroll. not from the 2nd onwards.Thanks for your valuable reply – adrian Oct 13 '11 at 14:32
1

Setting UISCrollView Position:

[myScrollView scrollRectToVisible:CGRectMake(x,y,width,height) animated:NO];

ader
  • 5,403
  • 1
  • 21
  • 26
0

I think that you use paging functionality for your case? If I right you can try making your scrollview less than the size of the screen (width-wise), but uncheck the "Clip Subviews" checkbox in IB. See more in this question.

Community
  • 1
  • 1
Victor
  • 3,497
  • 3
  • 39
  • 51