Giter Site home page Giter Site logo

lxtagview's Introduction

LXTagView

一个简单实用的标签排列控件

image

##Usage LXTagView *tagView = [[LXTagView alloc]init];

tagView.delegate = self;

tagView.tagMargin = 15;

tagView.tagPadding = 20;

//when you set all propery, and then set dataArray, not need set 'frame', it will auto caculate.

tagView.dataArray = dataArray;

[self.view addSubview:tagView];

##selectedResult ####- (void)LXTagViewWithSelectedArray:(NSMutableArray *)selectedArray WithSelectedTag:(UIButton *)selectedTag

##property //tag height. default 30.

@property (nonatomic, assign) CGFloat tagHeight;

//tag font. default systemFont 12.

@property (nonatomic, strong) UIFont *tagFont;

//tag backgroundColor. default white.

@property (nonatomic, strong) UIColor *tagBackgroundColor;

//tag selected backgroundColor. default black.

@property (nonatomic, strong) UIColor *tagSelectedBackgroundColor;

//tag selected textColor. default white.

@property (nonatomic, strong) UIColor *tagSelectedTextColor;

//tag textColor. default black.

@property (nonatomic, strong) UIColor *tagTextColor;

//tag borderWidth. default 1.

@property (nonatomic, assign) CGFloat tagBorderWidth;

//tag borderColor. default black.

@property (nonatomic, strong) UIColor *tagBorderColor;

//tag padding. default 10.

@property (nonatomic, assign) CGFloat tagPadding;

//tag Vertical margin. default 10.

@property (nonatomic, assign) CGFloat tagVerticalMargin;

//tag Horizontal margin. default equal Vertical margin.

@property (nonatomic, assign) CGFloat tagHorizontalMargin;

//left space. default 15.

@property (nonatomic, assign) CGFloat leftSpace;

//right space. default equal left.

@property (nonatomic, assign) CGFloat rightSpace;

//top space. default equal left.

@property (nonatomic, assign) CGFloat topSpace;

//top space. default equal left.

@property (nonatomic, assign) CGFloat bottomSpace;

//tag cornerRadius. default 0.

@property (nonatomic, assign) CGFloat tagCornerRadius;

//is tag only support click not selected. default true.

@property (nonatomic, assign) BOOL isTagSelected;

//dataSource.

@property (nonatomic, strong) NSArray *dataArray;

###如有特殊需求可以直接修改源码, 实现方式很简单.有疑问或者发现bug请issue我或者给我发邮件, 谢谢. ####目前只是简单的for循环实现, 未来会用collectionView进行复写.

lxtagview's People

Contributors

liuxu0718 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.