简体   繁体   中英

Storyboard: align button in custom UIView to another button in parent UIView using auto-layout constraints?

Assume a custom UIView, CustomView, that is designed with a Xib file. Inside CustomView is a UIButton, CustomButton.

ParentView is a UIView that contains CustomView.

With Storyboard, is it possible to create an auto-layout constraint that center aligns CustomButton with another button in ParentView?

No it is not possible to do what you are trying to do in storyboard. You would have to do it programatically.

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