简体   繁体   中英

Frame Resizing using AutoLayout

I have an UIView inside which i have a UIButton . I am using auto layout. Now I want to reduce the height of the UIView . How should I do it ? On reducing the height of the UIView , the UIButton inside the view should also move up at the same time. How can i do this using Auto Layout ?

You can create IBOutlet for height constraint of you view and you can change value for it.Just check how to create.

创建UIVIew高度约束出口

出口已创建

Now use the code below to set height of you UIVIew

  heightConstraintOfView.constant = DYNAMIC_HEIGHT;

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