简体   繁体   中英

Spaces down left and right side of iPad app

I have built an app that involves a UINavigationController with a UIViewController as root.

Then inside the UIViewController I have a UIView (top half) and a UITableView (bottom half).

I am using autolayout.

On the iPhone the UIView and UITableView go all the way to the left and right edges of the screen. On the iPad, however, there is about a 5 pixel space on the left and right side.

Has anyone seen this before and knows of a way of resolving it?

Worked it out. My autolayout values were wrong.

I had:

First Item = Superview.Trailing Second Item = View.Trailing Margin

By adding removing 'Margin' on second item (so neither had margin) they then aligned correctly. (This is done by selecting dropdown next to first item and selecting 'Relative to Margin'). I also had to set the Constant = 0 (since no margins used now)

在此处输入图片说明

Please Select deployment device Universal from Deployment info.

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