Latest | 1.0.0 |
---|---|
Homepage | https://github.com/KBvsMJ/EBTCustomAttributeLabel |
License | MIT |
Platforms | ios 8.0, requires ARC |
Dependencies | TTTAttributedLabel |
Authors |
label添加下划线以及实现添加点击事件(支持xib或者sb)
支持cocoapods,使用pod指令把类库添加到项目中
pod 'EBTAttributeLinkClickLabel'
使用案例:
NSString *text = @"已阅读并同意《发标授权协议》《代扣协议》"; __weak typeof(self)weakSelf = self; [self.lbl_Content attributeLinkLabelText:text withLinksAttribute:nil withActiveLinkAttributes:nil withLinkClickCompleteHandler:^(NSInteger linkedURLTag) { __strong typeof(weakSelf)strongSelf = weakSelf; strongSelf.lbl_Result.text = [NSString stringWithFormat:@"当前点击的tag%ld",linkedURLTag]; NSLog(@"linkedURLTag =%ld",linkedURLTag); } withUnderLineTextString:@"《发标授权协议》",@"《代扣协议》",nil];
效果图
Latest podspec
{ "name": "EBTAttributeLinkClickLabel", "version": "1.0.0", "summary": "EBTAttributeLinkClickLabel for underline click event and add active link clicked", "homepage": "https://github.com/KBvsMJ/EBTCustomAttributeLabel", "license": "MIT", "authors": { "KBvsMJ": "[email protected]" }, "platforms": { "ios": "8.0" }, "source": { "git": "https://github.com/KBvsMJ/EBTCustomAttributeLabel.git", "tag": "1.0.0" }, "source_files": "EBTAttributeLinkClickLabel/**/*.{h,m}", "exclude_files": "Classes/Exclude", "requires_arc": true, "dependencies": { "TTTAttributedLabel": [] } }
Mon, 20 Mar 2017 18:40:12 +0000