公共组件汇总

公共组件使用方法


弹框modal样式1-Qin

<h1>样式展示</h1> <p><img src="https://www.showdoc.cc/server/api/common/visitfile/sign/e45c8ed533ad75b18c63427802af14d4?showdoc=.jpg" alt="" /></p> <p><img src="https://www.showdoc.cc/server/api/common/visitfile/sign/4e96642aad2368576188ade33b98118d?showdoc=.jpg" alt="" /> <img src="https://www.showdoc.cc/server/api/common/visitfile/sign/1d1a24172eeb219c77485803e01d6197?showdoc=.jpg" alt="" /></p> <h1>控件代码参数说明</h1> <pre><code>titleLabel/*标题视图*/ contentLabel/*内容视图*/ leftButton /*左按钮*/ rightButton/*右按钮*/ buttonActionBlock/*按钮的回调*/ LLUIKit_AlerViewModalType /*按钮样式*/</code></pre> <pre><code>-(instancetype)initWithFrame:(CGRect)frame withAlerType:(LLUIKit_AlerViewModalType)modalType withTitleString:(NSString* __nullable)titleString withMessContent:(NSString* __nullable)messContent withLeftButtonTitle:(NSString*)leftButtonTitle withRightButtonTitle:(NSString* __nullable)rightButtonTitle;/* modalType --- 按钮的样式 titleString ---- 标题 messContent --- 消息内容 leftButtonTitle --- 左按钮的标题 rightButtonTitle --- 右按钮的标题 */ -(void)showAction;/*展示弹框视图*/ </code></pre> <h1>代码引用</h1> <pre><code>#import "LLUIKit_AlerViewModal.h"</code></pre> <pre><code>//没标题一个按钮 LLUIKit_AlerViewModal*alerViewModal = [[LLUIKit_AlerViewModal alloc]initWithAlerType:LLUIKit_AlerViewModalType_ButtonWithBackgroundColor withTitleString:@"" withMessContent:@"内容" withLeftButtonTitle:@"确定" withRightButtonTitle:nil]; alerViewModal.buttonActionBlock = ^(NSInteger index) { NSLog(@"%ld",index); }; [self presentViewController:alerViewModal animated:YES completion:nil]; </code></pre> <pre><code>//标题两个按钮 LLUIKit_AlerViewModal*alerViewModal = [[LLUIKit_AlerViewModal alloc]initWithAlerType:LLUIKit_AlerViewModalType_ButtonWithBackgroundColor withTitleString:@"标题" withMessContent:@"内容" withLeftButtonTitle:@"取消" withRightButtonTitle:@"确定"]; alerViewModal.buttonActionBlock = ^(NSInteger index) { NSLog(@"%ld",index); }; [self presentViewController:alerViewModal animated:YES completion:nil]; </code></pre> <h1>代码使用样例</h1> <pre><code> LLUIKit_AlertViewModal*alerViewModal = [[LLUIKit_AlertViewModal alloc]initWithAlerType:LLUIKit_AlerViewModalType_NoBackground withTitleString:@"标题" withMessContent:@"警告框内容请注意查看这是单独一个按钮,警告框内容请注意查看这是单独一个按钮,警告框内容请注意查看这是单独一个按钮警告框内容请注意查看这是单独一个按钮" withLeftButtonTitle:@"确定" withRightButtonTitle:nil]; alerViewModal.buttonActionBlock = ^(NSInteger index) { NSLog(@"%ld",index); }; [self presentViewController:alerViewModal animated:YES completion:nil]; </code></pre> <pre><code> LLUIKit_AlertViewModal*alerViewModal = [[LLUIKit_AlertViewModal alloc]initWithAlerType:LLUIKit_AlerViewModalType_NoBackground withTitleString:@"标题" withMessContent:@"警告框内容请注意查看这是单独一个按钮,警告框内容请注意查看这是单独一个按钮,警告框内容请注意查看这是单独一个按钮警告框内容请注意查看这是单独一个按钮" withLeftButtonTitle:@"确定" withRightButtonTitle:nil]; alerViewModal.buttonActionBlock = ^(NSInteger index) { NSLog(@"%ld",index); }; [self presentViewController:alerViewModal animated:YES completion:nil]; </code></pre>

页面列表

ITEM_HTML