![]() ![]() the MyFlowLayout is almost implement the flex-box function of the HTML/CSS. Flow layout often used in the scenes that the subviews is arranged regularly, it can be substitutive of UICollectionView to some extent. The orientation of the new line would be vertical and horizontal, so the flow layout is divided into: count constraints vertical flow layout, size constraints vertical flow layout, count constraints horizontal flow layout, size constraints horizontal flow layout. The constrains mentioned here includes count constraints and size constraints. įlow layout is a layout view presents in multi-line that the subviews are arranged in sequence according to the added order, and when meeting with a arranging constraint it will start a new line and rearrange. If the rowviews arranged in top-to-bottom order,the tableview is caled vertical table layout,in which the subviews are arranged from left to right If the rowviews arranged in in left-to-right order,the tableview is caled horizontal table layout,in which the subviews are arranged from top to bottom. First you must create a rowview and add it to the table layout, then add the subview to the rowview. Table layout is a layout view that the subviews are multi-row&col arranged like a table. Is equivalent to: TableLayout of Android and table of HTML. Any of the subviews is just gravity in either vertical orientation or horizontal orientation. Frame layout devided the vertical orientation to top,vertical center and bottom, while horizontal orientation is devided to left,horizontal center and right. ![]() Is equivalent to: FrameLayout of Android.įrame layout is a layout view that the subviews can be overlapped and gravity in a special location of the superview.The subviews' layout position&size is not depended to the adding order and establish dependency constraint with the superview. Relative layout is a layout view that the subviews layout and position through mutual constraints.The subviews in the relative layout are not depended to the adding order but layout and position by setting the subviews' constraints. Is equivalent to: AutoLayout of iOS and RelativeLayout of Android. The subviews arranged in left-to-right order is called horizontal linear layout.Ī. Subviews arranged in top-to-bottom order is called vertical linear layout view, and So the subviews' origin&size constraints are established by the added order. Linear layout is a single line layout view that the subviews are arranged in sequence according to the added order(from top to bottom or from left to right). Is equivalent to: UIStackView of iOS and LinearLayout of Android. there are two simple variables: myWidth, myHeight use to set NSNumber value. You can use equalTo method to set NSNumber or MyLayoutSize or NSArray value. UIView provides two extension variables:widthSize,heightSize to set view's width and height dimension. MyLayoutSize is represent to the size of a view. there are six simple variables:myLeft,myTop,myBottom,myRight,m圜enterX,m圜enterY use to set NSNumber value. You can use equalTo method to set NSNumber or MyLayoutPos or NSArray value. UIView provides six extension variables:leftPos, topPos, bottomPos, rightPos, centerXPos, centerYPos to set view's margin or space distance between self and others. ![]() MyLayoutPos is represent to the position of a view. ![]() MyLinearLayout *S = ĭ.widthSize.equalTo(S.widthSize).multiply( 40) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |