简体   繁体   中英

Xcode Scroll view being cut off when running simulation

Here I have one view controller embedded in the navigation controller. In this view controller I have the navigation bar up top, with a undo button and a title. In the main content area I wanted to have two table views that can be scrolled through with X number of cells. I also wish to have one more button at the bottom. I haven't create the obj-c files for the controller or the objects yet but in the storyboard here's what I have:

在此处输入图片说明

And when I run it this is what happens:

在此处输入图片说明

Is this an auto-layout issue? I have no constraints set but I tried setting constraints and it didn't make a difference. I also tried just using 1 table and scroll view and still got some issues when I added the navigation bar. Any ideas?

I was reading this but was not sure if this solution applies to me: UIScrollView is cut off from UITabBarController

Also, is the bottom navigation bar/tab appearing because I added a navigation item- Title, rather than just the navigation bar? I'm still new and learning and I'll still be looking for the answer while this is posted, but thanks for reading through this.

You need to pin your UIScrollView to top and bottom of its parent view to make sure it sizes itself to the height of your phone screen.

Here are step by step instructions: Scroll View not functioning IOS 7

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM