开发者

how to apply scrolling an page control on uiview?

I have to scroll 3 UIViews using nib with paging in iPhone?

I have 3 view and there are different things on all the views. 2 views have a able view and one have开发者_StackOverflow some form. so how can i scroll then with paging?


Read the docs for UIScrollView, and take a look at the pagingEnabled property: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScrollView_Class/Reference/UIScrollView.html

You can adapt Apple's PageControl sample project to suit your needs: https://developer.apple.com/library/ios/#samplecode/PageControl/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007795


Here is a good example on how to use a scroll view with paging enabled, it shows both how to use a UIScrollView and a UIPageControl.

http://www.edumobile.org/iphone/iphone-programming-tutorials/pagecontrol-example-in-iphone/


it might help you..

[scrollView setContentOffset:CGPointMake(x,y) animated:NO];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜