简体   繁体   中英

Unable to simultaneously satisfy constraints - Autolayout

I am using auto layout in my project. After adding some constraints and running the app, i see "Unable to simultaneously satisfy constraints" in the Xcode console. Though my app design works as expected in the device.

So is it necessary to satisfy the constraints even though the app is working fine?

Thanks.

The goal of autolayout is to use minimum possible constraints to satisfy the autolayout rules. Though some constraints are satisfied with respect to some particular views but it may be conflicting with respect to whole view.

It is not necesarry, but besides warnings and inconsistancy you could have a problem with your layout later.

Try to add missing constraints like this in your story board:

Editor > Resolve Auto Layout Issues > All Views in View Controller > Add Missing Constraints

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