Objective-C Learning Notes - UIPageControl
UIPageControl
翻页控件
UIPageControl 控件在 iOS 应用程序中出现的比较频繁,尤其在和 UIScrollView 配合来显示大量数据.
创建:
UIPageControl *myPageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0.0,400.0, 320.0, 0.0)];
设置属性:
myPageControl.numberOfPage = 5; //页面数目 myPageControl.currentPage = 3; //当前页数,第四页 myPageControl.hidesForSinglePage = YES; //隐藏指示器 myPageControl.defersCurrentPageDisplay = YES; [myPageControl updateCurrentPageDisplay];