-
Notifications
You must be signed in to change notification settings - Fork 257
Tutorial 3: Embed xml layout into traditional view hierarchy
zhenglibao edited this page Jan 13, 2018
·
1 revision
CGRect rcFrame = CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, 0);
FlexFrameView* header = [[FlexFrameView alloc]initWithFlex:@"TableHeader" Frame:rcFrame Owner:self];
header.flexibleHeight = YES;
[header layoutIfNeeded];
_table.tableHeaderView = header;
You can set fixed frame to it or make it flexible.
If the view is flexible, you can get notification with onFrameChange block when the view size changed.
Flexbox Introduction & performance (in Chinese)
Tutorial 1: Create View Controller with xml layout
Tutorial 2: Create Table Cell with xml layout
Tutorial 3: Embed xml layout into traditional view hierarchy
Tutorial 4: Use custom view in xml layout
Tutorial 5: Create reusable view using xml layout file