简体   繁体   中英

TableView doesnt stretch to full screen in storyboard

Im following a course on Udemy and the guy puts a new Table View on the storyboard and stretches it to full screen. But when I try it myself it doesnt allow me to stretch to the top 100%. It leaves the area for battery and time area. Im using Swift 4.2 You can see in the screenshot:

http://prntscr.com/n1xln3

Please help, thanks.

Well its normal, guess like a clock and battery its a normal component, if you just put the constraints with top margin 0, the Xcode put te table with 0px off space for this component, a tip you can try is this: 在此输入图像描述

I change the main view to red to you see more easily, when a open the constraints now, a top constraints is that:

在此输入图像描述

Because now is referring to the top of the view don't a clock and battery view

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