当我在iOS5中查看这个方式时,将tableViews与pageControls混合在一起有很多问题 - 可能会有错误的实现。我想知道是否仍然如此。
我在 pageControl 中看到了很多关于 tableView 的问题,但是我在询问反向问题。具体做法是:
是否可以将UIPageControl放在UITableViewController的tableView Header中?
黄色轮廓是tableViewHeader,蓝色是可滚动的tableView:
答案 0 :(得分:0)
你必须在表头中添加自定义UIPageControl,然后添加到headerview,就像我在headerview中添加标签一样。
-(void)viewDidLoad
{
// ...
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(XXX, YYY, XXX, YYY)];
//...
UIPageControl *page = [UIPageControl alloc]init];
//...
[headerView addSubview:page];
self.tableView.tableHeaderView = headerView;
// ...
}