I am very new to AutoLayout
. I have one problem. I need to change the frame of any UIView
when moving form portrait to landscape mode.
For example: If I have one UILabel
with frame (100,100,100,30) in portrait mode. And I want to change its frame to (400,400,100,30) if rotate iPad to landscape mode. I want to do this using storyboard and auto layout.
I want to avoid coding for this.
I try this one :
First check Use AutoLayout
Move your mouse point to UILabel
and drag right side with Ctrl Key and select Trailing space to container
Move your mouse point to UILabel
and drag left side with Ctrl Key and select Leading space to container
This is your output :
Check it. :)
This will help your in autolayout please see the given below images
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.