Wednesday, 15 April 2015

xcode - How to remove gap when using leading space on storyboard -



xcode - How to remove gap when using leading space on storyboard -

according app designed on storyboard size class enabled , utilize leading space , trailing space superview (set -16.0f).

then run on ipad or iphone 6 plus. has little gap on both side of screen. no gap on iphone 5s or iphone 4.

i know can done adding constraint compact width or using code. there anyway setup on storyboard? because don't want sub class view stretching control.

here sample when i'm running it.

running on ipad http://s15.postimg.org/raum4qv6j/i_os_simulator_screen_shot_1_nov_2557_9_49_38_am.png

running on iphone http://s15.postimg.org/ly16cvhwb/i_os_simulator_screen_shot_1_nov_2557_9_59_36_am.png

** i'm using xcode 6.1

thank in advance.

instead of setting constraints leading , trailing space set white bar have constraint equal width superview. (drag bar superview in storyboard , select "equal widths" pop-up).

xcode storyboard autolayout

No comments:

Post a Comment