Skip to content

Commit

Permalink
删除无效代码
Browse files Browse the repository at this point in the history
  • Loading branch information
chinaxxren committed Jun 12, 2019
1 parent 0842b8f commit 001159e
Show file tree
Hide file tree
Showing 14 changed files with 136 additions and 184 deletions.
2 changes: 1 addition & 1 deletion VVRichText.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Pod::Spec.new do |spec|
spec.name = "VVRichText"
spec.version = "0.0.3"
spec.version = "0.0.4"
spec.summary = "VVRichText 是一个支持异步文本渲染的富文本显示,编辑组件"
spec.homepage = "https://github.com/chinaxxren/VVRichText"
spec.license = "MIT"
Expand Down
10 changes: 5 additions & 5 deletions VVRichText/Demo/Controller/FeedController.m
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ - (void)keyboardDidAppearNotifications:(NSNotification *)notifications {
NSDictionary *userInfo = [notifications userInfo];
CGSize keyboardSize = [userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue].size;
CGFloat keyboardHeight = keyboardSize.height;
self.commentView.frame = CGRectMake(0.0f, SCREEN_HEIGHT - 44.0f - keyboardHeight, SCREEN_WIDTH, 44.0f);
self.commentView.frame = CGRectMake(0.0f, VV_SCREEN_HEIGHT - 44.0f - keyboardHeight, VV_SCREEN_WIDTH, 44.0f);
}

- (void)keyboardDidHidenNotifications:(NSNotification *)notifications {
self.commentView.frame = CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, 44.0f);
self.commentView.frame = CGRectMake(0, VV_SCREEN_HEIGHT, VV_SCREEN_WIDTH, 44.0f);
}

#pragma mark - Data
Expand Down Expand Up @@ -390,7 +390,7 @@ - (CommentView *)commentView {

__weak typeof(self) wself = self;
_commentView = [[CommentView alloc]
initWithFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, 54.0f)
initWithFrame:CGRectMake(0, VV_SCREEN_HEIGHT, VV_SCREEN_WIDTH, 54.0f)
sendBlock:^(NSString *content) {
__strong typeof(wself) swself = wself;
swself.postComment.content = content;
Expand All @@ -403,7 +403,7 @@ - (UITableView *)tableView {
if (_tableView) {
return _tableView;
}
_tableView = [[UITableView alloc] initWithFrame:SCREEN_BOUNDS style:UITableViewStylePlain];
_tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
Expand All @@ -415,7 +415,7 @@ - (TableViewHeader *)tableViewHeader {
if (_tableViewHeader) {
return _tableViewHeader;
}
_tableViewHeader = [[TableViewHeader alloc] initWithFrame:CGRectMake(0.0f, 0.0f, SCREEN_WIDTH, 300.0f)];
_tableViewHeader = [[TableViewHeader alloc] initWithFrame:CGRectMake(0.0f, 0.0f, VV_SCREEN_WIDTH, 300.0f)];
return _tableViewHeader;
}

Expand Down
18 changes: 9 additions & 9 deletions VVRichText/Demo/Controller/RichTextController.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ - (void)viewDidLoad {
//创建VVAsyncDisplayView对象
self.asyncView = [[VVAsyncDisplayView alloc] initWithFrame:CGRectMake(0.0f,
64.0,
SCREEN_WIDTH,
SCREEN_HEIGHT - 64.0f)];
VV_SCREEN_WIDTH,
VV_SCREEN_HEIGHT - 64.0f)];

//设置代理
self.asyncView.delegate = self;
Expand All @@ -32,7 +32,7 @@ - (void)viewDidLoad {

//创建VVTextStorage对象
VVTextStorage *ts = [[VVTextStorage alloc] init];
ts.frame = CGRectMake(20, 30.0f, SCREEN_WIDTH - 40.0f, CGFLOAT_MAX);
ts.frame = CGRectMake(20, 30.0f, VV_SCREEN_WIDTH - 40.0f, CGFLOAT_MAX);
ts.text = @"VVRichText支持图文混排,可以在文字中插入本地图片→网络图片→这UIView的子类→.给指定位置文字添加链接.快来试试吧。";
ts.font = [UIFont fontWithName:@"Heiti SC" size:15.0f];

Expand Down Expand Up @@ -62,15 +62,15 @@ - (void)viewDidLoad {
[ts vv_addLinkWithData:@"链接 :)"
range:NSMakeRange(53, 4)
linkColor:[UIColor blueColor]
highLightColor:RGB(0, 0, 0, 0.15)];
highLightColor:VV_COLOR(0, 0, 0, 0.15)];

//给整段文本添加点击事件
[ts vv_addLinkForWholeTextStorageWithData:@"第一段"
highLightColor:RGB(0, 0, 0, 0.15f)];
highLightColor:VV_COLOR(0, 0, 0, 0.15f)];

//给文本添加长按事件
[ts vv_addLongPressActionWithData:ts.text
highLightColor:RGB(0, 0, 0, 0.25f)];
highLightColor:VV_COLOR(0, 0, 0, 0.25f)];


//用属性字符串创建VVTextStorage
Expand All @@ -82,13 +82,13 @@ - (void)viewDidLoad {
[as1 setUnderlineStyle:NSUnderlineStyleDouble underlineColor:[UIColor blueColor]
range:NSMakeRange(9, as1.length - 20)];

[as1 setTextBackgroundColor:RGB(43, 187, 228, 0.9f) range:NSMakeRange(as1.length - 10, 10)];
[as1 setTextBackgroundColor:VV_COLOR(43, 187, 228, 0.9f) range:NSMakeRange(as1.length - 10, 10)];
[as1 setTextColor:[UIColor whiteColor] range:NSMakeRange(as1.length - 10, 10)];

VVTextStorage *ts1 = [VVTextStorage vv_textStorageWithText:as1
frame:CGRectMake(20.0f,
ts.bottom + 20.0f,
SCREEN_WIDTH - 40.0f,
VV_SCREEN_WIDTH - 40.0f,
CGFLOAT_MAX)];
ts1.linespacing = 3.0f;

Expand All @@ -100,7 +100,7 @@ - (void)viewDidLoad {
ts2.needDebug = YES;//设置为调试模式
ts2.frame = CGRectMake(20.0f,
ts1.bottom + 20.0f,
SCREEN_WIDTH - 40.0f,
VV_SCREEN_WIDTH - 40.0f,
200.0f);
ts2.linespacing = 8.0f;
ts2.vericalAlignment = VVTextVericalAlignmentCenter;//垂直方向居中对齐
Expand Down
Loading

0 comments on commit 001159e

Please sign in to comment.