JCTagListView
  
示例
要运行示例项目,首先克隆仓库,从 Example 目录运行 pod install
。
安装
JCTagListView 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile 中。
pod 'JCTagListView'
用法
IB_DESIGNABLE
@interface JCTagListView : UIView
@property (nonatomic, assign) IBInspectable CGFloat tagItemSpacing; // default: 10
@property (nonatomic, assign) IBInspectable CGFloat tagLineSpacing; // default: 10
@property (nonatomic, assign) IBInspectable CGFloat tagCornerRadius; // default: 10
@property (nonatomic, assign) IBInspectable CGFloat tagBorderWidth; // default: 0.5
@property (nonatomic, assign) UIEdgeInsets tagContentInset; // default: 5、 10、 5、 10
@property (nonatomic, strong) UIColor *tagBorderColor; // default: lightGrayColor
@property (nonatomic, strong) UIColor *tagSelectedBorderColor; // default: lightGrayColor
@property (nonatomic, strong) UIColor *tagTextColor; // default: darkGrayColor
@property (nonatomic, strong) UIColor *tagSelectedTextColor; // default: darkGrayColor
@property (nonatomic, strong) UIColor *tagBackgroundColor; // default: whiteColor
@property (nonatomic, strong) UIColor *tagSelectedBackgroundColor; // default: rgb(217,217,217)
@property (nonatomic, assign) BOOL supportSelected; // default: NO
@property (nonatomic, assign) BOOL supportMultipleSelected; // default: NO
@property (nonatomic, strong) UIFont *tagFont; // default: [UIFont systemFontOfSize:14.0f]
@property (nonatomic, strong) NSArray<NSString *> *tags;
@property (nonatomic, strong) NSMutableArray<NSString *> *selectedTags;
@property (nonatomic, strong, readonly) NSMutableArray<NSNumber *> *selectedTagsIndex; // selected result
@property (nonatomic, assign, readonly) CGFloat contentHeight; // Used to calculate the height
- (void)didSelectItem:(JCTagListViewBlock)block;
- (void)reloadData;
@end
作者
李京城
许可证
JCTagListView适用MIT许可证。更多信息请参阅LICENSE文件。