搞不懂的xib-2_insterface builder

show the attributes inspector
show the file inspector
show quick help inspector
show the size inspector
show the connections inspector
show the identity inspector

inspector检察员

IBInspectble

                
                    
                        
                            
                        
                    
                



                    
                        
                            
                        
                    

兄弟姐妹/ 祖先约束
sibling & ancestor constraints

后代约束
descendant constraints

uiview的priroity

1、content hugging priority
horizontal
vertical

2、content compression resistance priority
horizontal
vertical

3、intrinsic size---placehodler width , height

intrinsic ContentSize

4、ambiguity

约束的种类
1、间隔约束
horizontal space constraint
vertical space constraint

//    [NSLayoutConstraint constraintWithItem:<#(nonnull id)#>
//                                 attribute:<#(NSLayoutAttribute)#>
//                                 relatedBy:<#(NSLayoutRelation)#>
//                                    toItem:<#(nullable id)#>
//                                 attribute:<#(NSLayoutAttribute)#>
//                                multiplier:<#(CGFloat)#>
//                                  constant:<#(CGFloat)#>



view1   
The view for the left side of the constraint.
attr1   
The attribute of the view for the left side of the constraint.
relation    
The relationship between the left side of the constraint and the right side of the constraint.
view2   
The view for the right side of the constraint.
attr2   
The attribute of the view for the right side of the constraint.
multiplier  
The constant multiplied with the attribute on the right side of the constraint as part of getting the modified attribute.
c   
The constant added to the multiplied attribute value on the right side of the constraint to yield the final modified attribute.

6个(
first item,
ralation,// 等于、大于或等于、小于或等于
second item,

constant
priority
multiplier

2、固定宽、高约束
width constraint
height constraint

4个(
first item
relation
constant
priority

3、比例约束
aspect ratio constraint

6个(
first item
relation
second item

constant
priority
mulitiplier

你可能感兴趣的:(搞不懂的xib-2_insterface builder)