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 方法?任何人都可以帮忙吗?