简体   繁体   中英

Is it okay to ignore conflicting constraints in Xcode?

I am working on an app in Xcode and I get a lot of conflicting constraints when I run it in the simulator even though everything looks just fine. I've tried to solve every conflict but often ends up screwing up everything.

Someone told me that it's okay to ignore them as long as it doesn't affect the app from working. But is it true that I can just ignore it? Will App Store allow me to publish app with tons of conflicting constrains?

No, it is not okay. It is not specified how the layout engine resolves conflicts (it lists conflicts that it decided to ignore in a particular case in the end of the log message). So even if it works now, on your device with your OS version, there is no guarantee, that it won't brake in future/on some other device. It will most likely work, but there is no guarantee, so it's not safe.

The AppStore review team will allow your app to the AppStore though. If they won't encounter some terrible UI-related bugs due to broken constraints working differently on their side, I mean.

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