二级选择控件样式2-Qin
<h1>样式展示</h1>
<p><img src="https://www.showdoc.cc/server/api/common/visitfile/sign/05e0f73de6494f1a0e5b48901e20b07a?showdoc=.jpg" alt="" />
<img src="https://www.showdoc.cc/server/api/common/visitfile/sign/7db385dc5988d54c405cfe063e181d77?showdoc=.jpg" alt="" /></p>
<h1>控件代码参数说明</h1>
<p>haveTitleViewTag//标记是否有标题
/*
leftTable 左边列表
rightTable 右边列表
leftSelectIndex 左边选中行
rightSelectIndex 右边选中行
leftArray 左边数据源
rightArray 右边数据源
selectResaultBlock 选中确定后回调
**/</p>
<pre><code>/*
titleString 标题
subTitleStirng 小标题
dataArray 数据源
rightSelectStyle 样式
**/</code></pre>
<p>init(titleString:String?,subTitleStirng:String?,dataArray:Array<Any>,rightSelectStyle:LLUIKit_TwoStepSelectRightStyle ) </p>
<h1>代码引用</h1>
<p>LLCommon_PublicTool公共组件头文件引用</p>
<h1>代码使用样例</h1>
<pre><code> NSArray *arr = @[@{@"title":@"主标题1",
@"subcontent":@[@"标签1",@"标签1",@"标签1"]
},
@{@"title":@"主标题2",
@"subcontent":@[@"标签1",@"标签1",@"标签1"]
},
@{@"title":@"主标题3",
@"subcontent":@[@"标签1",@"标签1",@"标签1"]
}
];
LLUIKit_TwoStepSelectRightStyle*twoStepSelctRightStyle = [[LLUIKit_TwoStepSelectRightStyle alloc]initWithTheSelectedColor:UIColor.redColor theSelectedFont:nil theSelectImage:nil];
LLUIKit_TwoStepSelectView *view = [[LLUIKit_TwoStepSelectView alloc]initWithTitleString:@"标题" subTitleStirng:@"副标题" dataArray:arr rightSelectStyle:twoStepSelctRightStyle];
view.selectResaultBlock = ^(NSIndexPath * _Nonnull left, NSIndexPath * _Nonnull right) {
NSLog(@"%ld ==== %ld", left.row, right.row);
};
[self presentViewController:view animated:YES completion:nil];</code></pre>