2

now, this is the issue Xcode is giving me...

The leading constraint is missing refers to the right button: "Skip all tutorials"

The leading constraint is missing refers to the right button: "Skip all tutorials

I tried:

Horizontal spacing constraint, greater then 0

Horizontal spacing constraint, greater than 0

this gives me another warning: warning

why would the initial warning not go away?? it now has a leading constraint and the new warning is addressing exactly what I just did: I gave the constraint a greater than standard space, which in that case I set to 0...

I managed to silence the new warning by setting the constraint's priority to 250 instead of 1000. but the initial warning remains:

Leading constraint is missing, which may cause overlapping with other views.

I have also tried to use the auto solution Xcode suggests when you click on the view controller. The auto solution does the exact same thing I did and the fixed leading and trailing constraints may cause clipping warning appears again.

What can I do to silence this warning, or what am I doing wrong? As you can see there are 2 other places in my project where there are similar storyboard warnings as well, I hope solving this helps me solve the other ones as well, but if you have any ideas just by seeing the warning, please let me know.

Edit: here is the list of constraints for the right button: skipAll

and here the one of the left button: skip

position in superview: enter image description here

Superview constraints: superviewconstraints1 superviewconstraints2

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • Post screenshots showing us the constraints you have for the distinct labels: so we might say exactly what has to be removed/modified. – mugx Dec 22 '17 at 22:43
  • These are just warnings. I get them often in my projects. Does running the project display these elements properly? or does it report a breaking constraint and show something clearly wrong? There's no way that I've seen to silence these warnings - short of meeting the requirements it asks for – KSigWyatt Dec 22 '17 at 23:11
  • I thought you could see that in the first image? Sorry, I don't understand what the screenshot should be of. Should I post some of the size inspector of each button, where you can see the list of constraints? – Lorenz Saalmann Dec 22 '17 at 23:12
  • yes, list of constraints please – mugx Dec 22 '17 at 23:13
  • 1
    Everything runs fine, it's just bugging me because I feel like I didn't do it properly. Can I completely ignore these? (I've tested my UI on every device size) – Lorenz Saalmann Dec 22 '17 at 23:13
  • I would. I'd honestly only spend the time if something is broken. Try running it in the Simulator and see if everything works right. If so move on and focus your effort elsewhere. Otherwise you'd need to fix them. Xcode 9 has changed AutoLayout quite a bit so seeing these yellow warnings isn't a bad thing – KSigWyatt Dec 22 '17 at 23:15
  • @KSigWyatt okay thanks, I will just ignore them then. I will still see if there are any solutions coming up but otherwise not worry about it. Thanks for the answers – Lorenz Saalmann Dec 22 '17 at 23:20
  • Having a warning is always a bad thing, I suggest you to don't ignore it. Which is the superview? – mugx Dec 22 '17 at 23:27
  • I added a picture of the position in the superview – Lorenz Saalmann Dec 22 '17 at 23:38
  • might you post the superview's constraints? – mugx Dec 22 '17 at 23:41
  • added them as well, sorry for forgetting all this stuff I'm a beginner in swift and programming in general. appreciate the help, let me know if there is more that needs to be added – Lorenz Saalmann Dec 22 '17 at 23:48
  • Check this accepted solution: https://stackoverflow.com/a/45040394/2450755 I think might give some hints. If not solve the problem then try to make a new empty project from scratch incrementally adding more constraints until you find the one is causing the warning. Another thing you might do is removing from your project, pieces/constraints until the warning disappears (and give you the hint about the issue) – mugx Dec 22 '17 at 23:53
  • Thank you, removed not just the warning I was asking about but all the other similar ones too. I don't need to click on the localize button, do I? Because it's working fine now. – Lorenz Saalmann Dec 23 '17 at 00:01
  • no you don't need to touch localize – mugx Dec 23 '17 at 00:23
  • Okay, and thanks again – Lorenz Saalmann Dec 23 '17 at 03:06

0 Answers0