Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
alienjun committed May 13, 2016
1 parent b8f07f9 commit fa2bb52
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AJTagViewExample/DemoViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ - (void)changeTagViewStyle:(UITapGestureRecognizer *)tap {
tag.backgroundColor = color;
tag.pointColor = color;
tag.pointShadowColor = color;
tag.backgroundColor = color;
tag.font = [UIFont systemFontOfSize:18];
// 切换方向
tag.direction = tag.direction == AJTagDirectionLeft ? AJTagDirectionRight : AJTagDirectionLeft;
}
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,21 @@
#import "UIView+Tag.h"
//指定标签原点相对于需要显示的视图的百分比,需要显示的文字即可
AJTagView *tagView = [self.imageView aj_showTagWithPercent:CGPointMake(0.2, 0.3) text:@"人群中寻找"];

// 可以拖动tag
tagView.canMove = YES;
tagView.direction = AJTagDirectionLeft; // 设置标签朝向
// 设置标签朝向
tagView.direction = AJTagDirectionLeft;
// 背景色
tagView.backgroundColor = color;
// 标签原点颜色
tagView.pointColor = color;
// 标签原点阴影颜色
tagView.pointShadowColor = color;
// 标签字体
tagView.font = [UIFont systemFontOfSize:18];
// 单独设置text
tagView.text = @"test";

// 给tag添加点击事件
self.imageView.userInteractionEnabled = YES;
Expand Down

0 comments on commit fa2bb52

Please sign in to comment.