很多UIPageControl

时间:2013-11-16 11:01:03

标签: ios iphone uipagecontrol

我将UIPageControlUIScrollView一起使用。

我的问题是UIPageControl的点也是UIPageControl的框架。我使用以下代码:

m_pUIPageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(30,410,260,20)];
[m_pUIPageControl setBackgroundColor:[UIColor blackColor]];
[m_pUIPageControl setPageIndicatorTintColor:[UIColor whiteColor]];
m_pUIPageControl.numberOfPages = 40;
m_pUIPageControl.currentPage = 0;
[m_pUIPageControl setCurrentPageIndicatorTintColor:[UIColor redColor]];
[m_pUIPageControl addTarget:self action:@selector(changePage:) forControlEvents:UIControlEventValueChanged];
[self.view addSubview:m_pUIPageControl];

我如何控制点?

1 个答案:

答案 0 :(得分:0)

使框架变大,使控件的页面点数大小正确。

您还可以查看对控件应用缩放变换,但注意不要使控件无法使用/无效。