yyued / TwitterPaggingViewer

A twitter like navigation bar, page viewer.
MIT License
356 stars 45 forks source link

添加uipagecontrol失败了 ~~ #3

Closed ddcfcs closed 10 years ago

ddcfcs commented 10 years ago

我现在在一个UIviewcontroller(这里就叫A吧)的基础上添加UIPageViewController成功了,可以实现滑动翻页了。 现在我想在A的上面再加一个UIPageControll(这里叫B吧)失败了,不知道为什么不显示? 以下是我的步骤:

  1. @property (nonatomic,strong) UIPageControl *pageControl; @synthesize pageControl = _pageControl; 2.在A的viewDidLoad里写:[super viewDidLoad]; self.pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.view.frame.size.width, 40.0f)]; self.pageControl.currentPage = 0; self.pageControl.numberOfPages = 10; self.pageControl.userInteractionEnabled = NO; [self.view addSubview:self.pageControl]; (想先简单的显示出来,B上dots的实时移动先放一放)