Following this tutorial and this question, I attempted to create a custom UIViewController
containing a UINavigationController
. This mostly worked, except that the controller takes up the full screen and so the status bar overlaps it. Downloading the tutorial's source and running it, I found that the tutorial had the same problem (it uses a UITableViewController
). Further experimentation revealed that it works if the content of the custom controller is a UILabelView
instead.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
One possible solution is to change the
loadView
function of theUIViewController
to set the frame of the view using:[[UIScreen mainScreen] applicationFrame]
instead ofcontentView.frame
. I'm not sure whether this is the best solution and how this will interact if you attempt to put the custom view controller underneath another view controller.Ideally, I would be be given the size I have to draw into inside the
loadView
method. Unfortunately, we aren't given this. See this question for more info.