AgileTag 1.0

AgileTag 1.0

测试测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最新版本2017年4月

lovisty维护。



  • Zhao Yafei

示例

要运行示例项目,请先克隆库,然后从 Example 目录中运行 pod install

要求

iOS8+

屏幕截图

下拉式相册分组

安装

  • 通过 CocoaPods 安装  

AgileTag 支持通过 CocoaPods 进行安装。在 Podfile 文件中添加以下内容

pod "AgileTag"
  • 直接加项目中使用
git clone https://github.com/lovisty/AgileTag   

找到包含文件 Classes 和 Assets 的 AgileTag 文件,然后将 AgileTag 拖动到项目中。

导入头文件:

#import "YFAgileTagView.h"  

使用

初始化和赋值

YFAgileTagView *tagView = [[YFAgileTagView alloc] initWithFrame:YOUR_FRAME];
[tagView setIntervalVertical:10];//Tag之间的水平间距
[tagView setIntervalHorizontal:15];//Tag之间的竖直间距
[self addSubview:self.tagView];

//赋值
[self.tagView setSelectedDataArray:DATA_ARRAY];

提供的重要接口

//返回总高度
self.tagView.finallyHeightBlock = ^(CGFloat height){
  
};

//添加tag
[self.tagView addTagWithTitle:tagItem.currentTitle WithAnimation:YES completed:^{
           
}];

//删除tag
[firstCell.tagView removeTagWithTitle:tagItem.currentTitle WithAnimation:YES completed:^{

}];

注:每次调用添加或者删除tag后,会自动回调finallyHeightBlock返回添加或者删除后的高度,然后回调用completed。

作者

YaFei, [email protected]

个人博客:http://blog.csdn.net/u013749108

QQ:617267337

许可证

AgileTag 可在 MIT 许可证下获取。有关更多信息,请参阅 LICENSE 文件。