Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does symbolic="YES" mean in InterfaceBuilder's XML?

For a handful of the more complicated scenes on my storyboard, I'm trying out setting the constraints by manually editing the XML of the storyboard, rather than using Xcode, because having to keep everything in a consistent state while editing can sometimes be quite a bit more complicated than just scrapping all the constraints for a dimension and creating my own from scratch would be.

Most of the tags and attributes in the generated XML have obvious meanings. However, I can't figure out what the significance of the symbolic attribute is in constraints like this one (generated by Xcode):

<constraint firstItem="Sui-f6-rQa" firstAttribute="top" secondItem="1XK-fd-O82"
secondAttribute="bottom" constant="8" symbolic="YES" type="default" 
id="PVi-ci-8HN"/>

The word "symbolic" doesn't appear anywhere in the NSLayoutConstraint documentation, and I've never seen it in Xcode, so I can't really guess what it means.

What does it do, and do I need to be conscious of it when modifying storyboard (or xib) XML directly?

like image 813
Mark Amery Avatar asked Jul 08 '13 08:07

Mark Amery


1 Answers

symbolic="YES" corresponds to the checkbox in InterfaceBuilder 'Standard'

enter image description here

I haven't played around with changing the value of the constant from 8 or 20 while leaving symbolic="YES" but I suspect it would lead to badness.

like image 158
Tin Can Avatar answered Nov 07 '22 13:11

Tin Can