pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(153,356,38,36) ];
pageControl.userInteractionEnabled =YES;
pageControl.numberOfPages = 2;
pageControl.currentPage = 1;
pageControl.enabled = TRUE;
[pageControl setHighlighted:YES];
[pageControl addTarget:self action:@selector(changePage:) forControlEvents:UIControlEventValueChanged];
[self.view addSubview:pageControl];
}
- (IBAction) changePage:(id)sender
{
}
我正在以編程方式創建頁面控件,並且想要在頁面控件上單擊顯示新的視圖控制器。我需要如何實現這個changePage方法?誰能幫忙?UIPageControl中的問題
http://www.iosdevnotes.com/tag/pagecontrol/ – 2013-02-14 16:03:32