One_viewController_can_display_multiple_viewController

A custom PageViewController for iOS with the tab bar control at the top

Posted by kunnan on December 15, 2018

前言

最近一个需要在一个View 展示切换管理几个样式风格各异的View。因此写了这个模版

Example diagram

image

code

NSArray *tmp_itemArray = @[@"step1\n基本信息",@"step2\n信息",@"step3\n信息",@"step4\n照片"];

CGFloat leftEdg = 15;

CGFloat  tmptopButtonWidth = ([[UIScreen mainScreen] bounds].size.width-leftEdg*2)/tmp_itemArray.count;

CGFloat height = tmptopButtonWidth*(79/168.0);// 168/79 = w/h

TopButtonView  *tmp = [[TopButtonView alloc] initWithFrame:CGRectMake(leftEdg, leftEdg, [[UIScreen mainScreen] bounds].size.width-leftEdg*2, height) withTitleArray:tmp_itemArray];

See Also

/Users/devzkn/bin//knpost One_viewController_can_display_multiple_viewController A custom PageViewController for iOS with the tab bar control at the top -t Open_Source_Framework
#原来""的参数,需要自己加上""

转载请注明: > One_viewController_can_display_multiple_viewController