Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 721088d

Browse files
author
mengyaoyao
committed
提供一个类方法
1 parent 6311447 commit 721088d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

‎MYCoreText_Example/MYCoreTextLabel/MYCoreTextLabel.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ typedef void(^eventCallback)(NSString *linkString);
3131

3232
@interface MYCoreTextLabel : UIView
3333

34-
/**
35-
链接属性 ,如不设置 , 默认14号字体 , 默认链接字颜色为蓝色 , 内容字颜色为黑色
36-
*/
37-
//@property (nonatomic, strong) MYAttributeModel *attribute;
38-
3934
/**
4035
代理
4136
*/
@@ -119,6 +114,7 @@ typedef void(^eventCallback)(NSString *linkString);
119114
*/
120115
@property (nonatomic, strong) UIColor *keyWordBackColor;
121116

117+
+ (instancetype)coreTextLabel;
122118
/**
123119
内容添加链接 , 如不需要额外的指定链接 , customLinks传nil ,默认显示常规链接 @ #话题# web
124120
你可以通过attribute的shouldShowNormLink属性设置是否显示最常规的链接

‎MYCoreText_Example/MYCoreTextLabel/MYCoreTextLabel.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,4 +436,9 @@ - (void)reuseHandle
436436
}
437437
}
438438

439+
#pragma mark 类方法
440+
+ (instancetype)coreTextLabel
441+
{
442+
return [[self alloc]init];
443+
}
439444
@end

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /