ios - My UIPageControl is not showing? -
I generates a UIPage control for a welcome view with a scroll view, but page control Not showing on screen, this is my code:
- (zero) viewDidload {{Super Viewedload]; UIScrollView * scrollview = [[UIScrollView alloc] initWithFrame: self.view.bounds]; Scrollview.delegate = self; UIPageControl * pagecontrol = [[UIPageControl alloc] initWithFrame: CGRectMake (141, 511, 39, 37)]; Pagecontrol.numberOfPages = 3; Pagestank pageRenderTechnology = [UIColorGreen CMTSolar]; Pagecontrol.pageIndicatorTintColor = [UIColor grayColor]; [Self.navigationController.view addSubview: pagecontrol]; [Self. Navigation Controller See Adsview: Scrollview]; }
I need help finding this problem, I have a scene inside ScrollView where I show different images.
I think you should not add a view to the navigation controller. Because this subview will be followed by the navigation controller instead of the view that you want to add and in this case, you can not see the UIPagecontroller because the Crawlwy will overlap the pagcollector. You must add scrollable first and page camroller later:
[self.navigationController.view addSubview: scrollview]; [Self.navigationController.view addSubview: pagecontrol];
Comments
Post a Comment