I have a simple UIPageViewController which displays the default UIPageControl at the bottom of the pages. I wonder if it's possible to modify the position of the UIPageControl, e.g. to be on top of the screen instead of the bottom. I've been looking around and only found old discussions that say I need to create my own UIPageControl. Is this thing simpler with iOS8 and 9? Thanks.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
This is good, and with more change
Just lookup PageControl in PageViewController subclass and set frame, location or whatever you want
Yes, the Shameerjan answer is very good, but instead of adding another page control you can use default page indicator:
and then extend the size of the UIPageViewController to cover up the bottom gap:
Override the viewDidLayoutSubviews() of the pageviewcontroller and use this
The Shameerjan answer is very good, but it needs one more thing to work properly, and that is implementation of another delegate method:
This is because if you don't, if you move the page control just so slightly, it will go back to previous position - but the page control will show different page.
Hope it helps!
Make sure pageControl is added as subview. Then in