Full Code of ygweric/EYTagView for AI

master ee14a945fe63 cached
26 files
95.9 KB
26.2k tokens
1 symbols
1 requests
Download .txt
Repository: ygweric/EYTagView
Branch: master
Commit: ee14a945fe63
Files: 26
Total size: 95.9 KB

Directory structure:
gitextract_obiyesyi/

├── .gitignore
├── EYTagView/
│   ├── EYTagView.h
│   ├── EYTagView.m
│   ├── EYTextField.h
│   └── EYTextField.m
├── EYTagView_Example/
│   ├── EYTagView_Example/
│   │   ├── AppDelegate.h
│   │   ├── AppDelegate.m
│   │   ├── Base.lproj/
│   │   │   ├── LaunchScreen.xib
│   │   │   └── Main.storyboard
│   │   ├── Images.xcassets/
│   │   │   └── AppIcon.appiconset/
│   │   │       └── Contents.json
│   │   ├── Info.plist
│   │   ├── TableViewController.h
│   │   ├── TableViewController.m
│   │   ├── ViewController.h
│   │   ├── ViewController.m
│   │   ├── en.lproj/
│   │   │   └── Localizable.strings
│   │   ├── main.m
│   │   └── zh-Hans.lproj/
│   │       ├── LaunchScreen.strings
│   │       ├── Localizable.strings
│   │       └── Main.strings
│   ├── EYTagView_Example.xcodeproj/
│   │   ├── project.pbxproj
│   │   └── project.xcworkspace/
│   │       └── contents.xcworkspacedata
│   └── EYTagView_ExampleTests/
│       ├── EYTagView_ExampleTests.m
│       └── Info.plist
├── LICENSE
└── README.MD

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
tuangou.xcworkspace/xcuserdata/*
*Breakpoints*
ompiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db

/build/
*.dat
UserInterfaceState.xcuserstate
xcuserdata/
Pods/Pods.xcodeproj/xcuserdata/
EYTagView_Example/EYTagView_Example.xcodeproj/project.xcworkspace/xcshareddata/


================================================
FILE: EYTagView/EYTagView.h
================================================
//
//  EYTagView.h
//  EYTagView_Example
//
//  Created by ericyang on 8/9/15.
//  Copyright (c) 2015 Eric Yang. All rights reserved.
//
//
//  Current Version Time: 2015-08-27
//

#import <UIKit/UIKit.h>



#define COLORRGBA(c,a) [UIColor colorWithRed:((c>>16)&0xFF)/255.0	\
green:((c>>8)&0xFF)/255.0	\
blue:(c&0xFF)/255.0         \
alpha:a]
#define COLORRGB(c)    [UIColor colorWithRed:((c>>16)&0xFF)/255.0	\
green:((c>>8)&0xFF)/255.0	\
blue:(c&0xFF)/255.0         \
alpha:1.0]



#define _K_SCREEN_WIDTH ([[UIScreen mainScreen ] bounds ].size.width)

#ifndef DEBUG_LOG
#define DEBUG_LOG
#define LOGERROR NSLog(@"error !!!!!!!!! %s,%d",__FUNCTION__,__LINE__);
#define LOGWARNING NSLog(@"warning %s,%d",__FUNCTION__,__LINE__);
#define LOGERRORMSG(msg) NSLog(@"error:%@ %s,%d",msg,__FUNCTION__,__LINE__);
#define LOGLINE NSLog(@"info %s,%d",__FUNCTION__,__LINE__);
#define LOGINFO(format,value)  NSLog([NSString stringWithFormat:@"%@ ; info %%s,%%d",format],value,__FUNCTION__,__LINE__);
#define LOGTEXT(value)  NSLog(@"%@ ; info %s,%d",value,__FUNCTION__,__LINE__);
#define LOGTODO NSLog(@"TODO !!!!! ; info %s,%d",__FUNCTION__,__LINE__);
#define LOGTIME NSLog(@"%f %s,%d",[[NSDate date]timeIntervalSince1970],__FUNCTION__,__LINE__);

#define LOGNOTHING(format,value)
#endif

@class EYTagView;
@protocol EYTagViewDelegate <NSObject>

@optional
-(void)heightDidChangedTagView:(EYTagView*)tagView;

-(void)tagDidBeginEditing:(EYTagView*)tagView;
-(void)tagDidEndEditing:(EYTagView*)tagView;

/**
 *  @return whether delete
 */
-(BOOL)willRemoveTag:(EYTagView*)tagView index:(NSInteger)index;
@end

typedef enum{
    EYTagView_Type_Edit,
    EYTagView_Type_Edit_Only_Delete,
    EYTagView_Type_Display,
    EYTagView_Type_Single_Selected,
    EYTagView_Type_Multi_Selected,
    EYTagView_Type_Multi_Selected_Edit,
    EYTagView_Type_Flow,
}EYTagView_Type;

@interface EYTagView : UIView
@property (nonatomic, strong) id<EYTagViewDelegate> delegate;
@property (nonatomic, strong) UITextField* tfInput;
@property (nonatomic) EYTagView_Type type;//default edit



/**
 *  numberOfLines & preferredMaxLayoutWidth just like UILabel
 */
@property (nonatomic) NSInteger numberOfLines;//default 0

@property (nonatomic) float tagHeight;//default

@property (nonatomic) float viewMaxHeight;

@property (nonatomic) CGSize tagPaddingSize;//top & left
@property (nonatomic) CGSize textPaddingSize;


@property (nonatomic, strong) UIFont* fontTag;
@property (nonatomic, strong) UIFont* fontInput;


@property (nonatomic, strong) UIColor* colorTag;
@property (nonatomic, strong) UIColor* colorTagUnselected;
@property (nonatomic, strong) UIColor* colorTagBoard;
@property (nonatomic, strong) UIColor* colorInput;
@property (nonatomic, strong) UIColor* colorInputPlaceholder;

@property (nonatomic, strong) UIColor* colorTagBg;
@property (nonatomic, strong) UIColor* colorInputBg;
@property (nonatomic, strong) UIColor* colorInputBoard;

@property (assign) NSInteger maxSelected;
@property (nonatomic, strong) NSMutableArray *tagArrows;//array of alll arrow


- (void)addTags:(NSArray *)tags;
- (void)addTags:(NSArray *)tags selectedTags:(NSArray*)selectedTags;
- (NSArray *)getTagTexts;
- (void)removeAllTags;
- (void)removeTag:(NSString *)tag;
- (void)removeTagWithIndex:(NSInteger)index;
-(void)layoutTagviews;
-(void)setTagStringsSelected:(NSMutableArray *)tagStringsSelected;
-(NSMutableArray *)tagStrings;
-(void)finishEditing;
@end


================================================
FILE: EYTagView/EYTagView.m
================================================
//
//  EYTagView.m
//  EYTagView_Example
//
//  Created by ericyang on 8/9/15.
//  Copyright (c) 2015 Eric Yang. All rights reserved.
//





#import "EYTagView.h"
#import "EYTextField.h"

#ifndef EYLOCALSTRING
#define EYLOCALSTRING(STR) NSLocalizedString(STR, STR)
#endif

@interface EYCheckBoxButton :UIButton
@property (nonatomic, strong) UIColor* colorBg;
@property (nonatomic, strong) UIColor* colorText;
@property (nonatomic, strong) UIColor* colorTagUnSelected;
@property (nonatomic, strong) UIColor* colorTagBorder;

@end

@implementation EYCheckBoxButton
-(void)setSelected:(BOOL)selected{
    [super setSelected:selected];
    if (selected) {
        [self setBackgroundColor:_colorBg];
        self.layer.borderColor=_colorBg.CGColor;
        [self setTitleColor:_colorText forState:UIControlStateSelected];
    } else {
        [self setBackgroundColor:COLORRGB(0xffffff)];
        self.layer.borderColor=_colorTagBorder.CGColor;
        self.layer.borderWidth=1;
        [self setTitleColor:_colorTagUnSelected forState:UIControlStateNormal];
    }
    [self setNeedsDisplay];
}
@end


@interface EYTagView()<UITextFieldDelegate>
@property (nonatomic) CGFloat newHeight;
@property (nonatomic, strong) UIScrollView* svContainer;
@property (nonatomic, strong) NSMutableArray *tagStrings;//check whether tag is duplicated
@property (nonatomic, strong) NSMutableArray *tagButtons;//array of alll tag button
@property (nonatomic, strong) NSMutableArray *tagStringsSelected;
@property (assign) NSInteger tagButtonSelecteds;

@end

@implementation EYTagView
{
    NSInteger _editingTagIndex;
    BOOL _isInit;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if (self) {
        [self commonInit];
    }
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self commonInit];
    }
    return self;
}


- (void)commonInit
{
    _newHeight=self.frame.size.height;
    _type=EYTagView_Type_Edit;
    _tagHeight=18;
    _tagPaddingSize=CGSizeMake(6, 6);
    _textPaddingSize=CGSizeMake(0, 3);
    _fontTag=[UIFont systemFontOfSize:14];
    self.fontInput=[UIFont systemFontOfSize:14];
    _colorTag=COLORRGB(0xffffff);
    _colorTagUnselected=COLORRGB(0xa1a2a2);
    _colorInput=COLORRGB(0x2ab44e);
    _colorInputPlaceholder=COLORRGB(0x2ab44e);
    _colorTagBg=COLORRGB(0x2ab44e);
    _colorTagBoard=COLORRGB(0xdddddd);
    _colorInputBg=COLORRGB(0xbbbbbb);
    _colorInputBoard=COLORRGB(0x2ab44e);
    _viewMaxHeight=130;
    self.clipsToBounds=YES;
    self.backgroundColor=COLORRGB(0xffffff);
    _maxSelected = 0;
    _tagButtonSelecteds = 0;
    
    _tagButtons=[NSMutableArray new];
    _tagArrows=[NSMutableArray new];
    _tagStrings=[NSMutableArray new];
    _tagStringsSelected=[NSMutableArray new];
    
    {
        UIScrollView* sv = [[UIScrollView alloc] initWithFrame:self.bounds];
        sv.autoresizingMask=UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
        sv.contentSize=sv.frame.size;
        sv.contentSize=CGSizeMake(sv.frame.size.width, 600);
        sv.indicatorStyle=UIScrollViewIndicatorStyleDefault;
        sv.backgroundColor = self.backgroundColor;
        sv.showsVerticalScrollIndicator = YES;
        sv.showsHorizontalScrollIndicator = NO;
        [self addSubview:sv];
        _svContainer=sv;
    }
    {
        UITextField* tf = [[EYTextField alloc] initWithFrame:CGRectMake(0, 0, 0, _tagHeight)];
        tf.autocorrectionType = UITextAutocorrectionTypeNo;
        [tf addTarget:self action:@selector(textFieldDidChange:)forControlEvents:UIControlEventEditingChanged];
        tf.delegate = self;
        tf.placeholder=EYLOCALSTRING(@"Add Tag");
        tf.returnKeyType = UIReturnKeyDone;
        [_svContainer addSubview:tf];
        _tfInput=tf;
    }
    {
        UITapGestureRecognizer* panGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector
        (handlerTapGesture:)];
        panGestureRecognizer.numberOfTapsRequired=1;
        [self addGestureRecognizer:panGestureRecognizer];
    }
}
#pragma mark -
-(NSMutableArray *)tagStrings{
      switch (_type) {
        case EYTagView_Type_Edit:
        case EYTagView_Type_Edit_Only_Delete:
        {
            return _tagStrings;
        }
            break;
        case EYTagView_Type_Display:
        {
            return nil;
        }
            break;
        case EYTagView_Type_Single_Selected:
        {
            [_tagStringsSelected removeAllObjects];
            for (EYCheckBoxButton* button in _tagButtons) {
                if (button.selected) {
                    [_tagStringsSelected addObject:button.titleLabel.text];
                    break;
                }
            }
            return _tagStringsSelected;
        }
            break;
        case EYTagView_Type_Multi_Selected:
        {
            [_tagStringsSelected removeAllObjects];
            for (EYCheckBoxButton* button in _tagButtons) {
                if (button.selected) {
                    [_tagStringsSelected addObject:button.titleLabel.text];
                }
            }
            return _tagStringsSelected;
        }
              break;
        case EYTagView_Type_Multi_Selected_Edit:
        {
            [_tagStringsSelected removeAllObjects];
            for (EYCheckBoxButton* button in _tagButtons) {
                if (button.selected) {
                    [_tagStringsSelected addObject:button.titleLabel.text];
                }
            }
            return _tagStringsSelected;
        }
        default:
        {
            
        }
            break;
    }
    return nil;
}
-(UIView*)newArrowView{
    UIView* vArrow=[[UIView alloc]initWithFrame:CGRectMake(0, 0, _tagHeight*1.5f, _tagHeight)];
    vArrow.backgroundColor=[UIColor clearColor];
    {
        UILabel* lb=[[UILabel alloc]initWithFrame:vArrow.frame];
        lb.textAlignment=NSTextAlignmentCenter;
        lb.text=@"···>";
        lb.font=[UIFont systemFontOfSize:13];
        lb.textColor=_colorTagBg;
        lb.backgroundColor=[UIColor clearColor];
        [vArrow addSubview:lb];
    }
    
    
    return vArrow;
}

-(void)layoutTagviews{
    float oldContentHeight=_svContainer.contentSize.height;
    float offsetX=_tagPaddingSize.width,offsetY=_tagPaddingSize.height;
    
    if (_type==EYTagView_Type_Flow){
        for (UIView* v in _tagArrows) {
            [v removeFromSuperview];
        }
        [_tagArrows removeAllObjects];

    }
    
    BOOL needLayoutAgain=NO;// just for too large text
    BOOL shouldFinishLayout=NO;//just for break line
    int currentLine=0;
    for (int i=0; i<_tagButtons.count; i++) {
        EYCheckBoxButton* tagButton=_tagButtons[i];
        tagButton.hidden=NO;
        if (shouldFinishLayout) {
            tagButton.hidden=YES;
            continue;
        }
        CGRect frame=tagButton.frame;
        
        if (tagButton.frame.size.width+_tagPaddingSize.width*2>_svContainer.contentSize.width) {
            NSLog(@"!!!  tagButton width tooooooooo large");
            [tagButton removeFromSuperview];
            [_tagButtons removeObjectAtIndex:i];
            [_tagStrings removeObjectAtIndex:i];
            needLayoutAgain=YES;
            break;
        }else{
            //button
            if ((offsetX+tagButton.frame.size.width+_tagPaddingSize.width)
                <=_svContainer.contentSize.width) {
                frame.origin.x=offsetX;
                frame.origin.y=offsetY;
                offsetX+=tagButton.frame.size.width+_tagPaddingSize.width;
            }else{//break line
                currentLine++;
                if (_numberOfLines!=0
                    && _numberOfLines<=currentLine) {
                    shouldFinishLayout=YES;
                    if (_type==EYTagView_Type_Flow
                        && i!=0) {//not first one
                        [_tagArrows.lastObject removeFromSuperview];
                        [_tagArrows removeLastObject];
                    }
                    tagButton.hidden=YES;
                    continue;
                }
                
                offsetX=_tagPaddingSize.width;
                offsetY+=_tagHeight+_tagPaddingSize.height;
                
                frame.origin.x=offsetX;
                frame.origin.y=offsetY;
                offsetX+=tagButton.frame.size.width+_tagPaddingSize.width;
            }
            tagButton.frame=frame;
            //arrow
            if (_type==EYTagView_Type_Flow
                && i!=_tagButtons.count-1) {
                UIView* vArrow=[self newArrowView];
                
                frame=vArrow.frame;
                if ((offsetX+vArrow.frame.size.width+_tagPaddingSize.width)
                    <=_svContainer.contentSize.width) {
                    frame.origin.x=offsetX;
                    frame.origin.y=offsetY;
                    offsetX+=vArrow.frame.size.width+_tagPaddingSize.width;
                }else{//break line
                    currentLine++;
                    if (_numberOfLines!=0
                        && _numberOfLines<=currentLine) {
                        shouldFinishLayout=YES;
                        continue;
                    }
                    
                    offsetX=_tagPaddingSize.width;
                    offsetY+=_tagHeight+_tagPaddingSize.height;
                    
                    frame.origin.x=offsetX;
                    frame.origin.y=offsetY;
                    offsetX+=vArrow.frame.size.width+_tagPaddingSize.width;
                }
                vArrow.frame=frame;
                [_tagArrows addObject:vArrow];
                [_svContainer addSubview:vArrow];
            }
        }
    }
    if (needLayoutAgain) {
        [self layoutTagviews];
        return;
    }
    //input view
    _tfInput.hidden=(_type!=EYTagView_Type_Edit &&
                     _type!=EYTagView_Type_Multi_Selected_Edit);
    if (_type==EYTagView_Type_Edit || _type==EYTagView_Type_Multi_Selected_Edit) {
        _tfInput.backgroundColor=_colorInputBg;
        _tfInput.textColor=_colorInput;
        _tfInput.font=_fontInput;
        [_tfInput setValue:_colorInputPlaceholder forKeyPath:@"_placeholderLabel.textColor"];
        
        _tfInput.layer.cornerRadius = _tfInput.frame.size.height * 0.5f;
        _tfInput.layer.borderColor=_colorInputBoard.CGColor;
        _tfInput.layer.borderWidth=1;
        {
            CGRect frame=_tfInput.frame;
            frame.size.width = [_tfInput.text sizeWithAttributes:@{NSFontAttributeName:_fontInput}].width + (_tfInput.layer.cornerRadius * 2.0f) + _textPaddingSize.width*2;
            //place holde width
            frame.size.width=MAX(frame.size.width, [EYLOCALSTRING(@"Add Tag") sizeWithAttributes:@{NSFontAttributeName:_fontInput}].width + (_tfInput.layer.cornerRadius * 2.0f) + _textPaddingSize.width*2);
            _tfInput.frame=frame;
        }
        
        if (_tfInput.frame.size.width+_tagPaddingSize.width*2>_svContainer.contentSize.width) {
            NSLog(@"!!!  _tfInput width tooooooooo large");
            
        }else{
            CGRect frame=_tfInput.frame;
            if ((offsetX+_tfInput.frame.size.width+_tagPaddingSize.width)
                <=_svContainer.contentSize.width) {
                frame.origin.x=offsetX;
                frame.origin.y=offsetY;
                offsetX+=_tfInput.frame.size.width+_tagPaddingSize.width;
            }else{
                offsetX=_tagPaddingSize.width;
                offsetY+=_tagHeight+_tagPaddingSize.height;
                
                frame.origin.x=offsetX;
                frame.origin.y=offsetY;
                offsetX+=_tfInput.frame.size.width+_tagPaddingSize.width;
            }
            _tfInput.frame=frame;
            
        }
        
    }
    
    _svContainer.contentSize=CGSizeMake(_svContainer.frame.size.width, offsetY+_tagHeight+_tagPaddingSize.height);
    {
        CGRect frame=_svContainer.frame;
        frame.size.height=_svContainer.contentSize.height;
        frame.size.height=MIN(frame.size.height, _viewMaxHeight);
        _svContainer.frame=frame;
    }
    
    float oldHeight=self.frame.size.height;
    float newHeight=_svContainer.frame.size.height;
    
    if (self.translatesAutoresizingMaskIntoConstraints)
    {//autosizing
        {
            CGRect frame=self.frame;
            frame.size.height=newHeight;
            self.frame=frame;
        }
        if (!_isInit
            && oldHeight!= newHeight
            && _delegate) {
            [_delegate heightDidChangedTagView:self];
            
        }else{
            
        }
    }else
    {//auto layout
        if (oldHeight!= newHeight){
            _newHeight = newHeight;
            [self invalidateIntrinsicContentSize];
        }
    }
    
   
   
    if (oldContentHeight != _svContainer.contentSize.height) {
        CGPoint bottomOffset = CGPointMake(0, _svContainer.contentSize.height - _svContainer.bounds.size.height);
        [_svContainer setContentOffset:bottomOffset animated:YES];
    }
}

- (EYCheckBoxButton *)tagButtonWithTag:(NSString *)tag
{
    EYCheckBoxButton *tagBtn = [[EYCheckBoxButton alloc] init];
    tagBtn.colorBg=_colorTagBg;
    tagBtn.colorTagUnSelected=_colorTagUnselected;
    tagBtn.colorTagBorder=_colorTagBoard;
    
    tagBtn.colorText=_colorTag;
    tagBtn.selected=YES;
    [tagBtn.titleLabel setFont:_fontTag];
    [tagBtn setBackgroundColor:_colorTagBg];
    [tagBtn setTitleColor:_colorTag forState:UIControlStateNormal];
    [tagBtn addTarget:self action:@selector(handlerTagButtonEvent:) forControlEvents:UIControlEventTouchUpInside];
    [tagBtn setTitle:tag forState:UIControlStateNormal];
    
    CGRect btnFrame;
    btnFrame.size.height = _tagHeight;
    tagBtn.layer.cornerRadius = btnFrame.size.height * 0.5f;
    
    btnFrame.size.width = [tagBtn.titleLabel.text sizeWithAttributes:@{NSFontAttributeName:_fontTag}].width + (tagBtn.layer.cornerRadius * 2.0f) + _textPaddingSize.width*2;
    
    tagBtn.frame=btnFrame;
    return tagBtn;
}
- (void)handlerTagButtonEvent:(EYCheckBoxButton*)sender
{
    
}
#pragma mark action

- (void)addTags:(NSArray *)tags{
    _isInit=YES;
    for (NSString *tag in tags)
    {
        [self addTagToLast:tag];
    }
    [self layoutTagviews];
    _isInit=NO;
}
- (void)addTags:(NSArray *)tags selectedTags:(NSArray*)selectedTags{
    [self addTags:tags];
    self.tagStringsSelected=[NSMutableArray arrayWithArray:selectedTags];
}
- (void)addTagToLast:(NSString *)tag{
    NSArray *result = [_tagStrings filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF == %@", tag]];
    if (result.count == 0)
    {
        [_tagStrings addObject:tag];
        
        EYCheckBoxButton* tagButton=[self tagButtonWithTag:tag];
        [tagButton addTarget:self action:@selector(handlerButtonAction:) forControlEvents:UIControlEventTouchUpInside];
        [_svContainer addSubview:tagButton];
        [_tagButtons addObject:tagButton];
        
        switch (_type) {
            case EYTagView_Type_Single_Selected:
            case EYTagView_Type_Multi_Selected:
            {
                tagButton.selected=NO;
            }
                break;
            default:
                break;
        }
    }
    [self layoutTagviews];
}
- (void)removeAllTags{
    _isInit=YES;
    [_tagStrings removeAllObjects];
    for (UIView* v in _tagArrows) {
        [v removeFromSuperview];
    }
    [_tagArrows removeAllObjects];
    for (UIButton* bt in _tagButtons) {
        [bt removeFromSuperview];
        
    }
    [_tagButtons removeAllObjects];
    [self layoutTagviews];
    _isInit=NO;
}
- (void)removeTags:(NSArray *)tags{
    for (NSString *tag in tags)
    {
        [self removeTag:tag];
    }
    [self layoutTagviews];
}
- (void)removeTagWithIndex:(NSInteger)index{
    [self removeTag:_tagStrings[index]];
}
- (void)removeTag:(NSString *)tag{
    NSArray *result = [_tagStrings filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF == %@", tag]];
    if (result)
    {
        NSInteger index=[_tagStrings indexOfObject:tag];
        [_tagStrings removeObjectAtIndex:index];
        [_tagButtons[index] removeFromSuperview];
        [_tagButtons removeObjectAtIndex:index];
    }
    [self layoutTagviews];
}


-(void)handlerButtonAction:(EYCheckBoxButton*)tagButton{
    switch (_type) {
        case EYTagView_Type_Edit:
        case EYTagView_Type_Edit_Only_Delete:
        {
            [self becomeFirstResponder];
            _editingTagIndex=[_tagButtons indexOfObject:tagButton];
            CGRect buttonFrame=tagButton.frame;
            buttonFrame.size.height-=5;
            
            UIMenuController *menuController = [UIMenuController sharedMenuController];
            UIMenuItem *resetMenuItem = [[UIMenuItem alloc] initWithTitle:@"Delete" action:@selector(deleteItemClicked:)];
            
            NSAssert([self becomeFirstResponder], @"Sorry, UIMenuController will not work with %@ since it cannot become first responder", self);
            [menuController setMenuItems:[NSArray arrayWithObject:resetMenuItem]];
            [menuController setTargetRect:buttonFrame inView:_svContainer];
            [menuController setMenuVisible:YES animated:YES];
        }
            break;
        case EYTagView_Type_Single_Selected:
        {
            if (tagButton.selected) {
                tagButton.selected=NO;
            }else{
                for (EYCheckBoxButton* button in _tagButtons) {
                    button.selected=NO;
                }
                tagButton.colorBg=_colorTagBg;
                tagButton.selected=YES;
            }
        }
            break;
        case EYTagView_Type_Multi_Selected:
        {
            tagButton.selected=!tagButton.selected;
            //如果有标签数量选择限制
            if (_maxSelected != 0) {
                if (tagButton.selected == YES) {
                    _tagButtonSelecteds += 1;
                }else if(tagButton.selected == NO){
                    _tagButtonSelecteds -= 1;
                }
                if (_tagButtonSelecteds > _maxSelected) {
                    tagButton.selected=!tagButton.selected;
                    UIAlertView* alert=[[UIAlertView alloc]initWithTitle:nil message:[NSString stringWithFormat:@"您最多只能选择%ld个标签",_maxSelected] delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                    [alert show];
                    _tagButtonSelecteds -= 1;
                }
            }
        }
            break;
        case EYTagView_Type_Multi_Selected_Edit:
        {
            tagButton.selected=!tagButton.selected;
        }
            break;
        default:
        {
            
        }
            break;
    }
    
}

-(void)finishEditing{
    if ((_type==EYTagView_Type_Edit || _type==EYTagView_Type_Multi_Selected_Edit) &&
        _tfInput.isFirstResponder && _tfInput.text) {
        NSString* pureStr=[_tfInput.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
        if (pureStr
            && ![pureStr isEqualToString:@""]) {
            [self addTagToLast:pureStr];
            _tfInput.text=nil;
            [self layoutTagviews];
            
        }
    }
    [self.tfInput resignFirstResponder];
}

-(NSArray *)getTagTexts{
    NSMutableArray *texts = [NSMutableArray array];
    for (UIButton *bt in self.tagButtons) {
        if (bt.selected) {
            [texts addObject:bt.titleLabel.text];
        }
    }
    return [NSArray arrayWithArray:texts];
}

#pragma mark UITextFieldDelegate


- (BOOL)textFieldShouldReturn:(UITextField *)textField {
    [textField resignFirstResponder];
    if (!textField.text
        || [textField.text isEqualToString:@""]) {
        return NO;
    }
    [self addTagToLast:textField.text];
    textField.text=nil;
    [self layoutTagviews];
    return NO;
}

-(void)textFieldDidChange:(UITextField*)textField{
    [self layoutTagviews];
}
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
    
    NSString* sting2= [textField.text stringByReplacingCharactersInRange:range withString:string];
    
    CGRect frame=_tfInput.frame;
    frame.size.width = [sting2 sizeWithAttributes:@{NSFontAttributeName:_fontInput}].width + (_tfInput.layer.cornerRadius * 2.0f) + _textPaddingSize.width*2;
    frame.size.width=MAX(frame.size.width, [EYLOCALSTRING(@"Add Tag") sizeWithAttributes:@{NSFontAttributeName:_fontInput}].width + (_tfInput.layer.cornerRadius * 2.0f) + _textPaddingSize.width*2);
    
    if (frame.size.width+_tagPaddingSize.width*2>_svContainer.contentSize.width) {
        NSLog(@"!!!  _tfInput width tooooooooo large");
        return NO;
    }
    else{
        return YES;
    }
}
-(void)textFieldDidBeginEditing:(UITextField *)textField{
    if (_delegate && [_delegate respondsToSelector:@selector(tagDidBeginEditing:)]) {
        [_delegate tagDidBeginEditing:self];
    }
}


-(void)textFieldDidEndEditing:(UITextField *)textField{
    if (_delegate && [_delegate respondsToSelector:@selector(tagDidEndEditing:)]) {
        [_delegate tagDidEndEditing:self];
    }
}
#pragma mark UIMenuController

- (void) deleteItemClicked:(id) sender {
    if (_delegate && [_delegate respondsToSelector:@selector(willRemoveTag:index:)]) {
        if ([_delegate willRemoveTag:self index:_editingTagIndex]) {
            [self removeTag:_tagStrings[_editingTagIndex]];
        }
    }
}
- (BOOL) canPerformAction:(SEL)selector withSender:(id) sender {
    if (selector == @selector(deleteItemClicked:) /*|| selector == @selector(copy:)*/ /*<--enable that if you want the copy item */) {
        return YES;
    }
    return NO;
}
- (BOOL) canBecomeFirstResponder {
    return YES;
}
- (void)handlerTapGesture:(UIPanGestureRecognizer *)recognizer {
    [[UIMenuController sharedMenuController] setMenuVisible:NO animated:YES];
    if ((_type==EYTagView_Type_Edit || _type==EYTagView_Type_Multi_Selected_Edit)
        &&  _tfInput.isFirstResponder
        && _tfInput.text) {
        NSString* pureStr=[_tfInput.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
        if (pureStr
            && ![pureStr isEqualToString:@""]) {
            [self addTagToLast:pureStr];
            _tfInput.text=nil;
            [self layoutTagviews];
            
        }
    }
}
#pragma mark getter & setter
-(void)setBackgroundColor:(UIColor *)backgroundColor{
    [super setBackgroundColor:backgroundColor];
    _svContainer.backgroundColor=backgroundColor;
}
-(void)setType:(EYTagView_Type)type{
    _type=type;
    if (_type==EYTagView_Type_Display
        || _type==EYTagView_Type_Flow) {
        self.userInteractionEnabled=NO;
    }else{
        self.userInteractionEnabled=YES;
    }
    
    switch (_type) {
        case EYTagView_Type_Edit:
        case EYTagView_Type_Edit_Only_Delete:
        {
            for (UIButton* button in _tagButtons) {
                button.selected=YES;
            }
        }
            break;
        case EYTagView_Type_Display:
        {
            for (UIButton* button in _tagButtons) {
                button.selected=YES;
            }
        }
            break;
        case EYTagView_Type_Single_Selected:
        {
            for (UIButton* button in _tagButtons) {
                button.selected=[_tagStringsSelected containsObject:button.titleLabel.text];
            }
        }
            break;
        case EYTagView_Type_Multi_Selected:
        {
            for (UIButton* button in _tagButtons) {
                button.selected=[_tagStringsSelected containsObject:button.titleLabel.text];
            }
        }
            break;
        default:
        {
            
        }
            break;
    }
    [self layoutTagviews];
}
-(void)setColorTagBg:(UIColor *)colorTagBg{
    _colorTagBg=colorTagBg;
    for (EYCheckBoxButton* button in _tagButtons) {
        button.colorBg=colorTagBg;
    }
}
-(void)setColorTag:(UIColor *)colorTag{
    _colorTag=colorTag;
    for (EYCheckBoxButton* button in _tagButtons) {
        button.colorText=colorTag;
    }
}
-(void)setTagStringsSelected:(NSMutableArray *)tagStringsSelected{
    _tagStringsSelected=tagStringsSelected;
    switch (_type) {
        case EYTagView_Type_Single_Selected:
        case EYTagView_Type_Multi_Selected:
        {
            for (UIButton* button in _tagButtons) {
                button.selected=[tagStringsSelected containsObject:button.titleLabel.text];
            }
        }
            break;
        default:
        {
            
        }
            break;
    }
}
#pragma mark autolayout
-(CGSize)intrinsicContentSize{//UIViewNoIntrinsicMetric
    if (_numberOfLines==0) {
        return CGSizeMake(UIViewNoIntrinsicMetric, _newHeight);
    } else {
        return CGSizeMake((_tagPaddingSize.height+_tagHeight)*_numberOfLines+_tagPaddingSize.height, _newHeight);
    }
}
-(void)layoutSubviews{
    [self layoutTagviews];
}
@end


================================================
FILE: EYTagView/EYTextField.h
================================================
//
//  EYTextField.h
//  EYPopupView_Example
//
//  Created by ericyang on 8/14/15.
//  Copyright (c) 2015 Eric Yang. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface EYTextField : UITextField

@end


================================================
FILE: EYTagView/EYTextField.m
================================================
//
//  EYTextField.m
//  EYPopupView_Example
//
//  Created by ericyang on 8/14/15.
//  Copyright (c) 2015 Eric Yang. All rights reserved.
//

#import "EYTextField.h"

@implementation EYTextField

// placeholder position
- (CGRect)textRectForBounds:(CGRect)bounds {
    return CGRectInset( bounds , 9 , 0 );
}

// text position
- (CGRect)editingRectForBounds:(CGRect)bounds {
    return CGRectInset( bounds , 9 , 0 );
}

@end


================================================
FILE: EYTagView_Example/EYTagView_Example/AppDelegate.h
================================================
//
//  AppDelegate.h
//  EYTagView_Example
//
//  Created by ericyang on 8/9/15.
//  Copyright (c) 2015 Eric Yang. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;


@end



================================================
FILE: EYTagView_Example/EYTagView_Example/AppDelegate.m
================================================
//
//  AppDelegate.m
//  EYTagView_Example
//
//  Created by ericyang on 8/9/15.
//  Copyright (c) 2015 Eric Yang. All rights reserved.
//

#import "AppDelegate.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end


================================================
FILE: EYTagView_Example/EYTagView_Example/Base.lproj/LaunchScreen.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
        <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
    </dependencies>
    <objects>
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
        <view contentMode="scaleToFill" id="iN0-l3-epB">
            <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
            <subviews>
                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="  Copyright (c) 2015 Eric Yang. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
                    <rect key="frame" x="20" y="439" width="441" height="21"/>
                    <animations/>
                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
                    <nil key="highlightedColor"/>
                </label>
                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="EYTagView_Example" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
                    <rect key="frame" x="20" y="140" width="441" height="43"/>
                    <animations/>
                    <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
                    <nil key="highlightedColor"/>
                </label>
            </subviews>
            <animations/>
            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
            <constraints>
                <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
                <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
                <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
                <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
                <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
                <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
            </constraints>
            <nil key="simulatedStatusBarMetrics"/>
            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
            <point key="canvasLocation" x="548" y="455"/>
        </view>
    </objects>
</document>


================================================
FILE: EYTagView_Example/EYTagView_Example/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="2BK-85-JzC">
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
    </dependencies>
    <scenes>
        <!--View Controller-->
        <scene sceneID="ufC-wZ-h7g">
            <objects>
                <viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
                    <layoutGuides>
                        <viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
                        <viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
                    </layoutGuides>
                    <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                        <subviews>
                            <view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sGj-lX-OhZ" customClass="EYTagView">
                                <rect key="frame" x="56" y="80" width="507" height="135"/>
                                <animations/>
                                <color key="backgroundColor" red="0.87369791666666663" green="0.87369791666666663" blue="0.87369791666666663" alpha="1" colorSpace="calibratedRGB"/>
                                <constraints>
                                    <constraint firstAttribute="width" constant="230" id="PHz-Hr-tsV"/>
                                    <constraint firstAttribute="height" priority="1" constant="135" id="WbM-Vc-U9x"/>
                                </constraints>
                                <variation key="default">
                                    <mask key="constraints">
                                        <exclude reference="PHz-Hr-tsV"/>
                                    </mask>
                                </variation>
                            </view>
                            <view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qDV-dO-LPo" userLabel="Tag View2" customClass="EYTagView">
                                <rect key="frame" x="56" y="277" width="230" height="135"/>
                                <animations/>
                                <color key="backgroundColor" red="0.87369791669999997" green="0.87369791669999997" blue="0.87369791669999997" alpha="1" colorSpace="calibratedRGB"/>
                                <constraints>
                                    <constraint firstAttribute="height" priority="249" constant="135" id="Iyd-Wc-GAE"/>
                                    <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="135" id="eam-7G-nP0"/>
                                    <constraint firstAttribute="width" constant="230" id="jjP-Sl-dca"/>
                                    <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="230" id="nd7-B3-6rc"/>
                                </constraints>
                                <variation key="default">
                                    <mask key="constraints">
                                        <exclude reference="eam-7G-nP0"/>
                                        <exclude reference="nd7-B3-6rc"/>
                                    </mask>
                                </variation>
                            </view>
                            <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="d97-yo-As0">
                                <rect key="frame" x="138" y="429" width="30" height="30"/>
                                <animations/>
                                <constraints>
                                    <constraint firstAttribute="width" constant="30" id="J0f-8P-GfX"/>
                                    <constraint firstAttribute="height" constant="30" id="yXt-bd-VXm"/>
                                </constraints>
                                <state key="normal" title="test">
                                    <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
                                </state>
                                <connections>
                                    <action selector="test:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="QBG-9g-ATQ"/>
                                </connections>
                            </button>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="auto layout test auto layout test auto layout test auto layout test auto layout test " lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LVG-rX-BcK">
                                <rect key="frame" x="56" y="28" width="220" height="43"/>
                                <animations/>
                                <color key="backgroundColor" red="0.99215686270000003" green="0.51372549020000002" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                <constraints>
                                    <constraint firstAttribute="width" constant="220" id="S8B-KA-TNa"/>
                                    <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="10" id="ory-yl-Zjn"/>
                                </constraints>
                                <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                <nil key="highlightedColor"/>
                            </label>
                            <segmentedControl opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="xxm-ez-MoY">
                                <rect key="frame" x="21" y="232" width="345" height="29"/>
                                <animations/>
                                <constraints>
                                    <constraint firstAttribute="width" constant="345" id="VRF-1N-Rdg"/>
                                    <constraint firstAttribute="height" constant="28" id="aBq-42-o5I"/>
                                </constraints>
                                <segments>
                                    <segment title="edit"/>
                                    <segment title="show"/>
                                    <segment title="radio"/>
                                    <segment title="checkbox"/>
                                    <segment title="multi edit"/>
                                </segments>
                                <variation key="default">
                                    <mask key="constraints">
                                        <exclude reference="VRF-1N-Rdg"/>
                                    </mask>
                                </variation>
                                <connections>
                                    <action selector="handlerSegmentAction:" destination="vXZ-lx-hvc" eventType="valueChanged" id="mKx-6w-X2q"/>
                                </connections>
                            </segmentedControl>
                        </subviews>
                        <animations/>
                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
                        <constraints>
                            <constraint firstItem="d97-yo-As0" firstAttribute="top" secondItem="qDV-dO-LPo" secondAttribute="bottom" constant="17" id="1xq-XJ-GP8"/>
                            <constraint firstItem="xxm-ez-MoY" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="5" id="Ftf-cj-dee"/>
                            <constraint firstItem="LVG-rX-BcK" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="40" id="GYf-9a-P7D"/>
                            <constraint firstItem="xxm-ez-MoY" firstAttribute="top" secondItem="sGj-lX-OhZ" secondAttribute="bottom" constant="17" id="Gps-wR-T4h"/>
                            <constraint firstItem="LVG-rX-BcK" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="10" id="H9Y-Gc-EGd"/>
                            <constraint firstItem="qDV-dO-LPo" firstAttribute="top" secondItem="xxm-ez-MoY" secondAttribute="bottom" constant="17" id="Kgr-7U-cxy"/>
                            <constraint firstItem="qDV-dO-LPo" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="40" id="NlG-S7-RUc"/>
                            <constraint firstItem="LVG-rX-BcK" firstAttribute="top" secondItem="jyV-Pf-zRb" secondAttribute="bottom" constant="7" id="OSz-EU-WP8"/>
                            <constraint firstItem="d97-yo-As0" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="122" id="bFX-lm-tEp"/>
                            <constraint firstItem="sGj-lX-OhZ" firstAttribute="top" secondItem="LVG-rX-BcK" secondAttribute="bottom" constant="10" id="bmj-MH-dKS"/>
                            <constraint firstItem="sGj-lX-OhZ" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" constant="56" id="brq-g0-l7z"/>
                            <constraint firstAttribute="trailingMargin" secondItem="xxm-ez-MoY" secondAttribute="trailing" constant="5" id="ehF-nE-mJK"/>
                            <constraint firstAttribute="trailingMargin" secondItem="sGj-lX-OhZ" secondAttribute="trailing" constant="21" id="x4r-eW-Jku"/>
                        </constraints>
                        <variation key="default">
                            <mask key="constraints">
                                <exclude reference="H9Y-Gc-EGd"/>
                            </mask>
                        </variation>
                    </view>
                    <connections>
                        <outlet property="tagView" destination="sGj-lX-OhZ" id="0qo-PV-flH"/>
                        <outlet property="tagView2" destination="qDV-dO-LPo" id="448-Rc-1ix"/>
                    </connections>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="1095" y="860"/>
        </scene>
        <!--Root View Controller-->
        <scene sceneID="Rlt-2I-sjh">
            <objects>
                <tableViewController id="hBb-rb-Nnf" customClass="TableViewController" sceneMemberID="viewController">
                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="wbe-Ul-zXi">
                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <animations/>
                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                        <prototypes>
                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="TMp-E8-7gU">
                                <rect key="frame" x="0.0" y="92" width="600" height="44"/>
                                <autoresizingMask key="autoresizingMask"/>
                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="TMp-E8-7gU" id="XDI-5m-I1o">
                                    <rect key="frame" x="0.0" y="0.0" width="600" height="43.5"/>
                                    <autoresizingMask key="autoresizingMask"/>
                                    <animations/>
                                </tableViewCellContentView>
                                <animations/>
                                <connections>
                                    <segue destination="vXZ-lx-hvc" kind="show" identifier="Segue" trigger="accessoryAction" id="ooq-eG-ONB"/>
                                </connections>
                            </tableViewCell>
                        </prototypes>
                        <connections>
                            <outlet property="dataSource" destination="hBb-rb-Nnf" id="tzZ-Gx-RU9"/>
                            <outlet property="delegate" destination="hBb-rb-Nnf" id="Vkw-sj-Dxz"/>
                        </connections>
                    </tableView>
                    <navigationItem key="navigationItem" title="Root View Controller" id="ICK-TT-DwA"/>
                </tableViewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="eMo-8b-5tN" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="142" y="867"/>
        </scene>
        <!--Navigation Controller-->
        <scene sceneID="a3U-b5-p5B">
            <objects>
                <navigationController id="2BK-85-JzC" sceneMemberID="viewController">
                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="68t-Rl-wxo">
                        <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
                        <autoresizingMask key="autoresizingMask"/>
                        <animations/>
                    </navigationBar>
                    <connections>
                        <segue destination="hBb-rb-Nnf" kind="relationship" relationship="rootViewController" id="PNy-8t-2J1"/>
                    </connections>
                </navigationController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="6RJ-5p-wa4" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="-774" y="741"/>
        </scene>
    </scenes>
</document>


================================================
FILE: EYTagView_Example/EYTagView_Example/Images.xcassets/AppIcon.appiconset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "iphone",
      "size" : "29x29",
      "scale" : "2x"
    },
    {
      "idiom" : "iphone",
      "size" : "29x29",
      "scale" : "3x"
    },
    {
      "idiom" : "iphone",
      "size" : "40x40",
      "scale" : "2x"
    },
    {
      "idiom" : "iphone",
      "size" : "40x40",
      "scale" : "3x"
    },
    {
      "idiom" : "iphone",
      "size" : "60x60",
      "scale" : "2x"
    },
    {
      "idiom" : "iphone",
      "size" : "60x60",
      "scale" : "3x"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: EYTagView_Example/EYTagView_Example/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>com.appcpu.$(PRODUCT_NAME:rfc1034identifier)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>$(PRODUCT_NAME)</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIMainStoryboardFile</key>
	<string>Main</string>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>armv7</string>
	</array>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
</dict>
</plist>


================================================
FILE: EYTagView_Example/EYTagView_Example/TableViewController.h
================================================
//
//  TableViewController.h
//  EYTagView_Example
//
//  Created by ericyang on 10/11/15.
//  Copyright © 2015 Eric Yang. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface TableViewController : UITableViewController

@end


================================================
FILE: EYTagView_Example/EYTagView_Example/TableViewController.m
================================================
//
//  TableViewController.m
//  EYTagView_Example
//
//  Created by ericyang on 10/11/15.
//  Copyright © 2015 Eric Yang. All rights reserved.
//

#import "TableViewController.h"
#import "ViewController.h"
#import "EYTagView.h"

@interface TableViewController ()

@end

@implementation TableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
    
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
    NSIndexPath* indexPath=[self.tableView indexPathForSelectedRow];
    ViewController* vc=  segue.destinationViewController;

    vc.type=indexPath.row%(EYTagView_Type_Flow+1);
}
#pragma mark - Table view data source


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return EYTagView_Type_Flow+1;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath {
    [self performSegueWithIdentifier:@"Segue" sender:self];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
    
    // Configure the cell...
  switch (indexPath.row) {
        case 0:
        {
            cell.textLabel.text=@"EYTagView_Type_Edit";
        }
            break;
        case 1:
        {
            cell.textLabel.text=@"EYTagView_Type_Edit_Only_Delete";
        }
            break;
        case 2:
        {
            cell.textLabel.text=@"EYTagView_Type_Display";
        }
            break;
        case 3:
        {
            cell.textLabel.text=@"EYTagView_Type_Single_Selected";
        }
            break;
        case 4:
        {
            cell.textLabel.text=@"EYTagView_Type_Multi_Selected";
        }
            break;
        case 5:
        {
            cell.textLabel.text=@"EYTagView_Type_Multi_Selected_Edit";
        }
            break;
        case 6:
        {
            cell.textLabel.text=@"EYTagView_Type_Flow";
        }
            break;        
  }
    return cell;
}


/*
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the specified item to be editable.
    return YES;
}
*/

/*
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        // Delete the row from the data source
        [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
    } else if (editingStyle == UITableViewCellEditingStyleInsert) {
        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
    }   
}
*/

/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
}
*/

/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the item to be re-orderable.
    return YES;
}
*/

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


================================================
FILE: EYTagView_Example/EYTagView_Example/ViewController.h
================================================
//
//  ViewController.h
//  EYTagView_Example
//
//  Created by ericyang on 8/9/15.
//  Copyright (c) 2015 Eric Yang. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "EYTagView.h"

@interface ViewController : UIViewController

@property (nonatomic) EYTagView_Type type;
@end



================================================
FILE: EYTagView_Example/EYTagView_Example/ViewController.m
================================================
//
//  ViewController.m
//  EYTagView_Example
//
//  Created by ericyang on 8/9/15.
//  Copyright (c) 2015 Eric Yang. All rights reserved.
//

#import "ViewController.h"
/**
 @[
 @"dog",
 @"cat",
 @"pig",
 @"duck",
 @"horse",
 @"elephant",
 @"ant",
 @"fish",
 @"bird",
 @"engle",
 @"snake",
 @"mouse",
 @"squirrel",
 @"beaver",
 @"kangaroo",
 @"monkey",
 @"panda",
 @"bear",
 @"lion",
 ]
 */

@interface ViewController ()<EYTagViewDelegate>
@property (strong, nonatomic) IBOutlet EYTagView *tagView;
@property (strong, nonatomic) IBOutlet EYTagView *tagView2;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    {
        EYTagView* tagView=_tagView;
        tagView.colorTag=COLORRGB(0xffffff);
        tagView.colorTagBg=COLORRGB(0x2ab44e);
        tagView.colorInput=COLORRGB(0x2ab44e);
        tagView.colorInputBg=COLORRGB(0xffffff);
        tagView.colorInputPlaceholder=COLORRGB(0x2ab44e);
        tagView.backgroundColor=COLORRGB(0x00ffff);
        tagView.colorInputBoard=COLORRGB(0x2ab44e);
        tagView.viewMaxHeight=230;
        tagView.type=_type;
        
        [tagView addTags:@[
                           @"dog",
                           @"cat",
                           @"pig",
                           @"duck",
                           @"horse",
                           @"elephant",
                           @"ant",
                           @"fish",
                           @"bird",
                           @"engle",
                           @"snake",
                           @"mouse",
                           @"squirrel",
                           @"beaver",
                           @"kangaroo",
                           @"monkey",
                           @"panda",
                           @"bear",
                           @"lion",
                           ]];
    }
    
    {
        EYTagView* tagView=_tagView2;
        
        tagView.colorTag=COLORRGB(0xffffff);
        tagView.colorTagBg=COLORRGB(0x2ab44e);
        tagView.colorInput=COLORRGB(0x2ab44e);
        tagView.colorInputBg=COLORRGB(0xffffff);
        tagView.colorInputPlaceholder=COLORRGB(0x2ab44e);
        tagView.backgroundColor=COLORRGB(0x00ffff);
        tagView.colorInputBoard=COLORRGB(0x2ab44e);
        
        tagView.type=_type;
        tagView.viewMaxHeight=230;
        
        [tagView addTags:@[
                           @"pig",
                           @"duck",
                           @"horse",
                           @"elephant",
                           @"ant",
                           @"fish",                        
                           ]];
    }
    
    
}



-(void)heightDidChangedTagView:(EYTagView *)tagView{
    NSLog(@"heightDidChangedTagView");
}
- (IBAction)toggleType:(UISwitch*)sender {
    _tagView.type=sender.on?EYTagView_Type_Edit:EYTagView_Type_Display;
}
- (IBAction)handlerSegmentAction:(UISegmentedControl*)sender {
    _tagView.type=(EYTagView_Type)sender.selectedSegmentIndex;
    switch (sender.selectedSegmentIndex) {
        case 0:
        {
            
        }
            break;
        case 1:
        {
            
        }
            break;
        case 2:
        {
            
        }
            break;
        case 3:
        {
            
        }
            break;
            
        default:
            break;
    }
    
    
}
- (IBAction)test:(id)sender {
    NSLog(@"%@",_tagView);
}
@end


================================================
FILE: EYTagView_Example/EYTagView_Example/en.lproj/Localizable.strings
================================================
"Add Tag"="Add Tag";


================================================
FILE: EYTagView_Example/EYTagView_Example/main.m
================================================
//
//  main.m
//  EYTagView_Example
//
//  Created by ericyang on 8/9/15.
//  Copyright (c) 2015 Eric Yang. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AppDelegate.h"

int main(int argc, char * argv[]) {
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}


================================================
FILE: EYTagView_Example/EYTagView_Example/zh-Hans.lproj/LaunchScreen.strings
================================================

/* Class = "UILabel"; text = "  Copyright (c) 2015 Eric Yang. All rights reserved."; ObjectID = "8ie-xW-0ye"; */
"8ie-xW-0ye.text" = "  Copyright (c) 2015 Eric Yang. All rights reserved.";

/* Class = "UILabel"; text = "EYTagView_Example"; ObjectID = "kId-c2-rCX"; */
"kId-c2-rCX.text" = "EYTagView_Example";


================================================
FILE: EYTagView_Example/EYTagView_Example/zh-Hans.lproj/Localizable.strings
================================================
"Add Tag"="添加标签";


================================================
FILE: EYTagView_Example/EYTagView_Example/zh-Hans.lproj/Main.strings
================================================

/* Class = "UILabel"; text = "auto layout test"; ObjectID = "LVG-rX-BcK"; */
"LVG-rX-BcK.text" = "auto layout test";

/* Class = "UISegmentedControl"; gko-4U-5Zb.segmentTitles[0] = "tag edit"; ObjectID = "gko-4U-5Zb"; */
"gko-4U-5Zb.segmentTitles[0]" = "tag edit";

/* Class = "UISegmentedControl"; gko-4U-5Zb.segmentTitles[1] = "tag show"; ObjectID = "gko-4U-5Zb"; */
"gko-4U-5Zb.segmentTitles[1]" = "tag show";

/* Class = "UISegmentedControl"; gko-4U-5Zb.segmentTitles[2] = "radio"; ObjectID = "gko-4U-5Zb"; */
"gko-4U-5Zb.segmentTitles[2]" = "radio";

/* Class = "UISegmentedControl"; gko-4U-5Zb.segmentTitles[3] = "checkbox"; ObjectID = "gko-4U-5Zb"; */
"gko-4U-5Zb.segmentTitles[3]" = "checkbox";


================================================
FILE: EYTagView_Example/EYTagView_Example.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
	archiveVersion = 1;
	classes = {
	};
	objectVersion = 46;
	objects = {

/* Begin PBXBuildFile section */
		5F3FDF9C1B77248B00DE721B /* EYTagView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3FDF9B1B77248B00DE721B /* EYTagView.m */; };
		5F4923191BC9F2CD00C23CE1 /* TableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F4923181BC9F2CD00C23CE1 /* TableViewController.m */; settings = {ASSET_TAGS = (); }; };
		5FE358CB1B770259007D66B3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FE358CA1B770259007D66B3 /* main.m */; };
		5FE358CE1B770259007D66B3 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FE358CD1B770259007D66B3 /* AppDelegate.m */; };
		5FE358D11B770259007D66B3 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FE358D01B770259007D66B3 /* ViewController.m */; };
		5FE358D41B770259007D66B3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5FE358D21B770259007D66B3 /* Main.storyboard */; };
		5FE358D61B770259007D66B3 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5FE358D51B770259007D66B3 /* Images.xcassets */; };
		5FE358D91B770259007D66B3 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5FE358D71B770259007D66B3 /* LaunchScreen.xib */; };
		5FE358E51B770259007D66B3 /* EYTagView_ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FE358E41B770259007D66B3 /* EYTagView_ExampleTests.m */; };
		5FE9C34C1B8F542B00868E32 /* EYTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FE9C34B1B8F542B00868E32 /* EYTextField.m */; };
		5FE9C3541B8F5D4300868E32 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5FE9C3561B8F5D4300868E32 /* Localizable.strings */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
		5FE358DF1B770259007D66B3 /* PBXContainerItemProxy */ = {
			isa = PBXContainerItemProxy;
			containerPortal = 5FE358BD1B770259007D66B3 /* Project object */;
			proxyType = 1;
			remoteGlobalIDString = 5FE358C41B770259007D66B3;
			remoteInfo = EYTagView_Example;
		};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
		5F3FDF9A1B77248B00DE721B /* EYTagView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EYTagView.h; sourceTree = "<group>"; };
		5F3FDF9B1B77248B00DE721B /* EYTagView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EYTagView.m; sourceTree = "<group>"; };
		5F4923171BC9F2CD00C23CE1 /* TableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableViewController.h; sourceTree = "<group>"; };
		5F4923181BC9F2CD00C23CE1 /* TableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableViewController.m; sourceTree = "<group>"; };
		5FE358C51B770259007D66B3 /* EYTagView_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EYTagView_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
		5FE358C91B770259007D66B3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
		5FE358CA1B770259007D66B3 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
		5FE358CC1B770259007D66B3 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
		5FE358CD1B770259007D66B3 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
		5FE358CF1B770259007D66B3 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
		5FE358D01B770259007D66B3 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
		5FE358D31B770259007D66B3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
		5FE358D51B770259007D66B3 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
		5FE358D81B770259007D66B3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
		5FE358DE1B770259007D66B3 /* EYTagView_ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EYTagView_ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
		5FE358E31B770259007D66B3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
		5FE358E41B770259007D66B3 /* EYTagView_ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EYTagView_ExampleTests.m; sourceTree = "<group>"; };
		5FE9C34A1B8F542B00868E32 /* EYTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EYTextField.h; sourceTree = "<group>"; };
		5FE9C34B1B8F542B00868E32 /* EYTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EYTextField.m; sourceTree = "<group>"; };
		5FE9C3521B8F5CD600868E32 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
		5FE9C3531B8F5CD600868E32 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
		5FE9C3551B8F5D4300868E32 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
		5FE9C3571B8F5D4500868E32 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
		5FE358C21B770259007D66B3 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		5FE358DB1B770259007D66B3 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
		5F3FDF991B77248B00DE721B /* EYTagView */ = {
			isa = PBXGroup;
			children = (
				5F3FDF9A1B77248B00DE721B /* EYTagView.h */,
				5F3FDF9B1B77248B00DE721B /* EYTagView.m */,
				5FE9C34A1B8F542B00868E32 /* EYTextField.h */,
				5FE9C34B1B8F542B00868E32 /* EYTextField.m */,
			);
			name = EYTagView;
			path = ../EYTagView;
			sourceTree = "<group>";
		};
		5FE358BC1B770259007D66B3 = {
			isa = PBXGroup;
			children = (
				5F3FDF991B77248B00DE721B /* EYTagView */,
				5FE358C71B770259007D66B3 /* EYTagView_Example */,
				5FE358E11B770259007D66B3 /* EYTagView_ExampleTests */,
				5FE358C61B770259007D66B3 /* Products */,
			);
			sourceTree = "<group>";
		};
		5FE358C61B770259007D66B3 /* Products */ = {
			isa = PBXGroup;
			children = (
				5FE358C51B770259007D66B3 /* EYTagView_Example.app */,
				5FE358DE1B770259007D66B3 /* EYTagView_ExampleTests.xctest */,
			);
			name = Products;
			sourceTree = "<group>";
		};
		5FE358C71B770259007D66B3 /* EYTagView_Example */ = {
			isa = PBXGroup;
			children = (
				5FE9C3561B8F5D4300868E32 /* Localizable.strings */,
				5FE358CC1B770259007D66B3 /* AppDelegate.h */,
				5FE358CD1B770259007D66B3 /* AppDelegate.m */,
				5FE358CF1B770259007D66B3 /* ViewController.h */,
				5FE358D01B770259007D66B3 /* ViewController.m */,
				5F4923171BC9F2CD00C23CE1 /* TableViewController.h */,
				5F4923181BC9F2CD00C23CE1 /* TableViewController.m */,
				5FE358D21B770259007D66B3 /* Main.storyboard */,
				5FE358D51B770259007D66B3 /* Images.xcassets */,
				5FE358D71B770259007D66B3 /* LaunchScreen.xib */,
				5FE358C81B770259007D66B3 /* Supporting Files */,
			);
			path = EYTagView_Example;
			sourceTree = "<group>";
		};
		5FE358C81B770259007D66B3 /* Supporting Files */ = {
			isa = PBXGroup;
			children = (
				5FE358C91B770259007D66B3 /* Info.plist */,
				5FE358CA1B770259007D66B3 /* main.m */,
			);
			name = "Supporting Files";
			sourceTree = "<group>";
		};
		5FE358E11B770259007D66B3 /* EYTagView_ExampleTests */ = {
			isa = PBXGroup;
			children = (
				5FE358E41B770259007D66B3 /* EYTagView_ExampleTests.m */,
				5FE358E21B770259007D66B3 /* Supporting Files */,
			);
			path = EYTagView_ExampleTests;
			sourceTree = "<group>";
		};
		5FE358E21B770259007D66B3 /* Supporting Files */ = {
			isa = PBXGroup;
			children = (
				5FE358E31B770259007D66B3 /* Info.plist */,
			);
			name = "Supporting Files";
			sourceTree = "<group>";
		};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
		5FE358C41B770259007D66B3 /* EYTagView_Example */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = 5FE358E81B770259007D66B3 /* Build configuration list for PBXNativeTarget "EYTagView_Example" */;
			buildPhases = (
				5FE358C11B770259007D66B3 /* Sources */,
				5FE358C21B770259007D66B3 /* Frameworks */,
				5FE358C31B770259007D66B3 /* Resources */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = EYTagView_Example;
			productName = EYTagView_Example;
			productReference = 5FE358C51B770259007D66B3 /* EYTagView_Example.app */;
			productType = "com.apple.product-type.application";
		};
		5FE358DD1B770259007D66B3 /* EYTagView_ExampleTests */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = 5FE358EB1B770259007D66B3 /* Build configuration list for PBXNativeTarget "EYTagView_ExampleTests" */;
			buildPhases = (
				5FE358DA1B770259007D66B3 /* Sources */,
				5FE358DB1B770259007D66B3 /* Frameworks */,
				5FE358DC1B770259007D66B3 /* Resources */,
			);
			buildRules = (
			);
			dependencies = (
				5FE358E01B770259007D66B3 /* PBXTargetDependency */,
			);
			name = EYTagView_ExampleTests;
			productName = EYTagView_ExampleTests;
			productReference = 5FE358DE1B770259007D66B3 /* EYTagView_ExampleTests.xctest */;
			productType = "com.apple.product-type.bundle.unit-test";
		};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
		5FE358BD1B770259007D66B3 /* Project object */ = {
			isa = PBXProject;
			attributes = {
				LastUpgradeCheck = 0640;
				ORGANIZATIONNAME = "Eric Yang";
				TargetAttributes = {
					5FE358C41B770259007D66B3 = {
						CreatedOnToolsVersion = 6.4;
						DevelopmentTeam = 77SM2DKNM6;
					};
					5FE358DD1B770259007D66B3 = {
						CreatedOnToolsVersion = 6.4;
						TestTargetID = 5FE358C41B770259007D66B3;
					};
				};
			};
			buildConfigurationList = 5FE358C01B770259007D66B3 /* Build configuration list for PBXProject "EYTagView_Example" */;
			compatibilityVersion = "Xcode 3.2";
			developmentRegion = English;
			hasScannedForEncodings = 0;
			knownRegions = (
				en,
				Base,
				"zh-Hans",
			);
			mainGroup = 5FE358BC1B770259007D66B3;
			productRefGroup = 5FE358C61B770259007D66B3 /* Products */;
			projectDirPath = "";
			projectRoot = "";
			targets = (
				5FE358C41B770259007D66B3 /* EYTagView_Example */,
				5FE358DD1B770259007D66B3 /* EYTagView_ExampleTests */,
			);
		};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
		5FE358C31B770259007D66B3 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				5FE358D41B770259007D66B3 /* Main.storyboard in Resources */,
				5FE9C3541B8F5D4300868E32 /* Localizable.strings in Resources */,
				5FE358D91B770259007D66B3 /* LaunchScreen.xib in Resources */,
				5FE358D61B770259007D66B3 /* Images.xcassets in Resources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		5FE358DC1B770259007D66B3 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
		5FE358C11B770259007D66B3 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				5FE9C34C1B8F542B00868E32 /* EYTextField.m in Sources */,
				5F4923191BC9F2CD00C23CE1 /* TableViewController.m in Sources */,
				5FE358D11B770259007D66B3 /* ViewController.m in Sources */,
				5FE358CE1B770259007D66B3 /* AppDelegate.m in Sources */,
				5FE358CB1B770259007D66B3 /* main.m in Sources */,
				5F3FDF9C1B77248B00DE721B /* EYTagView.m in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		5FE358DA1B770259007D66B3 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				5FE358E51B770259007D66B3 /* EYTagView_ExampleTests.m in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
		5FE358E01B770259007D66B3 /* PBXTargetDependency */ = {
			isa = PBXTargetDependency;
			target = 5FE358C41B770259007D66B3 /* EYTagView_Example */;
			targetProxy = 5FE358DF1B770259007D66B3 /* PBXContainerItemProxy */;
		};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
		5FE358D21B770259007D66B3 /* Main.storyboard */ = {
			isa = PBXVariantGroup;
			children = (
				5FE358D31B770259007D66B3 /* Base */,
				5FE9C3521B8F5CD600868E32 /* zh-Hans */,
			);
			name = Main.storyboard;
			sourceTree = "<group>";
		};
		5FE358D71B770259007D66B3 /* LaunchScreen.xib */ = {
			isa = PBXVariantGroup;
			children = (
				5FE358D81B770259007D66B3 /* Base */,
				5FE9C3531B8F5CD600868E32 /* zh-Hans */,
			);
			name = LaunchScreen.xib;
			sourceTree = "<group>";
		};
		5FE9C3561B8F5D4300868E32 /* Localizable.strings */ = {
			isa = PBXVariantGroup;
			children = (
				5FE9C3551B8F5D4300868E32 /* en */,
				5FE9C3571B8F5D4500868E32 /* zh-Hans */,
			);
			name = Localizable.strings;
			sourceTree = "<group>";
		};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
		5FE358E61B770259007D66B3 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
				CLANG_CXX_LIBRARY = "libc++";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_UNREACHABLE_CODE = YES;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
				COPY_PHASE_STRIP = NO;
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				GCC_C_LANGUAGE_STANDARD = gnu99;
				GCC_DYNAMIC_NO_PIC = NO;
				GCC_NO_COMMON_BLOCKS = YES;
				GCC_OPTIMIZATION_LEVEL = 0;
				GCC_PREPROCESSOR_DEFINITIONS = (
					"DEBUG=1",
					"$(inherited)",
				);
				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				IPHONEOS_DEPLOYMENT_TARGET = 8.4;
				MTL_ENABLE_DEBUG_INFO = YES;
				ONLY_ACTIVE_ARCH = YES;
				SDKROOT = iphoneos;
			};
			name = Debug;
		};
		5FE358E71B770259007D66B3 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
				CLANG_CXX_LIBRARY = "libc++";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_UNREACHABLE_CODE = YES;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
				COPY_PHASE_STRIP = NO;
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
				ENABLE_NS_ASSERTIONS = NO;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				GCC_C_LANGUAGE_STANDARD = gnu99;
				GCC_NO_COMMON_BLOCKS = YES;
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				IPHONEOS_DEPLOYMENT_TARGET = 8.4;
				MTL_ENABLE_DEBUG_INFO = NO;
				SDKROOT = iphoneos;
				VALIDATE_PRODUCT = YES;
			};
			name = Release;
		};
		5FE358E91B770259007D66B3 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				CODE_SIGN_IDENTITY = "iPhone Distribution: YANG WEI (77SM2DKNM6)";
				INFOPLIST_FILE = EYTagView_Example/Info.plist;
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
				PRODUCT_NAME = "$(TARGET_NAME)";
			};
			name = Debug;
		};
		5FE358EA1B770259007D66B3 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				CODE_SIGN_IDENTITY = "iPhone Distribution: YANG WEI (77SM2DKNM6)";
				INFOPLIST_FILE = EYTagView_Example/Info.plist;
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
				PRODUCT_NAME = "$(TARGET_NAME)";
			};
			name = Release;
		};
		5FE358EC1B770259007D66B3 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				BUNDLE_LOADER = "$(TEST_HOST)";
				FRAMEWORK_SEARCH_PATHS = (
					"$(SDKROOT)/Developer/Library/Frameworks",
					"$(inherited)",
				);
				GCC_PREPROCESSOR_DEFINITIONS = (
					"DEBUG=1",
					"$(inherited)",
				);
				INFOPLIST_FILE = EYTagView_ExampleTests/Info.plist;
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
				PRODUCT_NAME = "$(TARGET_NAME)";
				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EYTagView_Example.app/EYTagView_Example";
			};
			name = Debug;
		};
		5FE358ED1B770259007D66B3 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				BUNDLE_LOADER = "$(TEST_HOST)";
				FRAMEWORK_SEARCH_PATHS = (
					"$(SDKROOT)/Developer/Library/Frameworks",
					"$(inherited)",
				);
				INFOPLIST_FILE = EYTagView_ExampleTests/Info.plist;
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
				PRODUCT_NAME = "$(TARGET_NAME)";
				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EYTagView_Example.app/EYTagView_Example";
			};
			name = Release;
		};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
		5FE358C01B770259007D66B3 /* Build configuration list for PBXProject "EYTagView_Example" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				5FE358E61B770259007D66B3 /* Debug */,
				5FE358E71B770259007D66B3 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		5FE358E81B770259007D66B3 /* Build configuration list for PBXNativeTarget "EYTagView_Example" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				5FE358E91B770259007D66B3 /* Debug */,
				5FE358EA1B770259007D66B3 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		5FE358EB1B770259007D66B3 /* Build configuration list for PBXNativeTarget "EYTagView_ExampleTests" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				5FE358EC1B770259007D66B3 /* Debug */,
				5FE358ED1B770259007D66B3 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
/* End XCConfigurationList section */
	};
	rootObject = 5FE358BD1B770259007D66B3 /* Project object */;
}


================================================
FILE: EYTagView_Example/EYTagView_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:EYTagView_Example.xcodeproj">
   </FileRef>
</Workspace>


================================================
FILE: EYTagView_Example/EYTagView_ExampleTests/EYTagView_ExampleTests.m
================================================
//
//  EYTagView_ExampleTests.m
//  EYTagView_ExampleTests
//
//  Created by ericyang on 8/9/15.
//  Copyright (c) 2015 Eric Yang. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>

@interface EYTagView_ExampleTests : XCTestCase

@end

@implementation EYTagView_ExampleTests

- (void)setUp {
    [super setUp];
    // Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
    // Put teardown code here. This method is called after the invocation of each test method in the class.
    [super tearDown];
}

- (void)testExample {
    // This is an example of a functional test case.
    XCTAssert(YES, @"Pass");
}

- (void)testPerformanceExample {
    // This is an example of a performance test case.
    [self measureBlock:^{
        // Put the code you want to measure the time of here.
    }];
}

@end


================================================
FILE: EYTagView_Example/EYTagView_ExampleTests/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>com.appcpu.$(PRODUCT_NAME:rfc1034identifier)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>$(PRODUCT_NAME)</string>
	<key>CFBundlePackageType</key>
	<string>BNDL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1</string>
</dict>
</plist>


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "{}"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright {yyyy} {name of copyright owner}

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.



================================================
FILE: README.MD
================================================
# EYTagView

------

EYTagView is a custome view simulate iOS Evernote's tag editing view.
---

####EYTagView is included in a more powerful project [EYPopupView](https://github.com/ygweric/EYPopupView)

---

###What can EYTagView do ???

1. Show unlimited number of tags in EYTagView with bricks layout

![scrollable.gif](https://raw.githubusercontent.com/ygweric/EYTagView/master/screenshots/1scrollable.gif)


2. Can add and delete tag free

3. Can disable editing tags if you want

![scrollable.gif](https://raw.githubusercontent.com/ygweric/EYTagView/master/screenshots/1editable.gif)

4. You can donfig almost all color and font as yo want

```
_tagView.colorTag=COLORRGB(0xffffff);
_tagView.colorTagBg=COLORRGB(0x2ab44e);
_tagView.colorInput=COLORRGB(0x2ab44e);
_tagView.colorInputBg=COLORRGB(0xffffff);
_tagView.colorInputPlaceholder=COLORRGB(0x2ab44e);
_tagView.backgroundColor=COLORRGB(0xffffff);
_tagView.colorInputBoard=COLORRGB(0x2ab44e);
_tagView.viewMaxHeight=130;
```



---
### how to use EYTagView

```Object-C
   EYTagView* _tagView=[[EYTagView alloc]initWithFrame:CGRectMake(10, 10, 200, 200)];
   [self.view addSubview:_tagView];
    _tagView.delegate=self;
    [_tagView addTags:@[
                        @"111",
                        @"222",
                        @"犬瘟热",
                        @"惹我欠人情无人区污染污染",
                        @"3而是",
                        @"是",
                        ]];
```
in `EYTagViewDelegate` ,the method `heightDidChangedTagView:(EYTagView *)` wil be called when the EYTagView's height is changed, so you can update the layout.

---

If you are using autolayout, you dan do the following:

1. layout you view in the xib or storyboard as normal. 

2. set the height and width of EYTagView to a constant value, but set the priority to <=249 ,which less that `Content Hugging priority 250`


Then the _vContainer's frame will change with _tagView.

---
If you don't know how to use EYTagView well, you can check the example project or create an issue

--
###EYTagView not support TableViewCell, use Header/Footer or ScrollView instead
Download .txt
gitextract_obiyesyi/

├── .gitignore
├── EYTagView/
│   ├── EYTagView.h
│   ├── EYTagView.m
│   ├── EYTextField.h
│   └── EYTextField.m
├── EYTagView_Example/
│   ├── EYTagView_Example/
│   │   ├── AppDelegate.h
│   │   ├── AppDelegate.m
│   │   ├── Base.lproj/
│   │   │   ├── LaunchScreen.xib
│   │   │   └── Main.storyboard
│   │   ├── Images.xcassets/
│   │   │   └── AppIcon.appiconset/
│   │   │       └── Contents.json
│   │   ├── Info.plist
│   │   ├── TableViewController.h
│   │   ├── TableViewController.m
│   │   ├── ViewController.h
│   │   ├── ViewController.m
│   │   ├── en.lproj/
│   │   │   └── Localizable.strings
│   │   ├── main.m
│   │   └── zh-Hans.lproj/
│   │       ├── LaunchScreen.strings
│   │       ├── Localizable.strings
│   │       └── Main.strings
│   ├── EYTagView_Example.xcodeproj/
│   │   ├── project.pbxproj
│   │   └── project.xcworkspace/
│   │       └── contents.xcworkspacedata
│   └── EYTagView_ExampleTests/
│       ├── EYTagView_ExampleTests.m
│       └── Info.plist
├── LICENSE
└── README.MD
Download .txt
SYMBOL INDEX (1 symbols across 1 files)

FILE: EYTagView/EYTagView.h
  type EYTagView_Type (line 58) | typedef enum{
Condensed preview — 26 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (106K chars).
[
  {
    "path": ".gitignore",
    "chars": 664,
    "preview": "tuangou.xcworkspace/xcuserdata/*\n*Breakpoints*\nompiled source #\n###################\n*.com\n*.class\n*.dll\n*.exe\n*.o\n*.so\n\n"
  },
  {
    "path": "EYTagView/EYTagView.h",
    "chars": 3422,
    "preview": "//\n//  EYTagView.h\n//  EYTagView_Example\n//\n//  Created by ericyang on 8/9/15.\n//  Copyright (c) 2015 Eric Yang. All rig"
  },
  {
    "path": "EYTagView/EYTagView.m",
    "chars": 25120,
    "preview": "//\n//  EYTagView.m\n//  EYTagView_Example\n//\n//  Created by ericyang on 8/9/15.\n//  Copyright (c) 2015 Eric Yang. All rig"
  },
  {
    "path": "EYTagView/EYTextField.h",
    "chars": 211,
    "preview": "//\n//  EYTextField.h\n//  EYPopupView_Example\n//\n//  Created by ericyang on 8/14/15.\n//  Copyright (c) 2015 Eric Yang. Al"
  },
  {
    "path": "EYTagView/EYTextField.m",
    "chars": 426,
    "preview": "//\n//  EYTextField.m\n//  EYPopupView_Example\n//\n//  Created by ericyang on 8/14/15.\n//  Copyright (c) 2015 Eric Yang. Al"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/AppDelegate.h",
    "chars": 283,
    "preview": "//\n//  AppDelegate.h\n//  EYTagView_Example\n//\n//  Created by ericyang on 8/9/15.\n//  Copyright (c) 2015 Eric Yang. All r"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/AppDelegate.m",
    "chars": 2037,
    "preview": "//\n//  AppDelegate.m\n//  EYTagView_Example\n//\n//  Created by ericyang on 8/9/15.\n//  Copyright (c) 2015 Eric Yang. All r"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/Base.lproj/LaunchScreen.xib",
    "chars": 3843,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/Base.lproj/Main.storyboard",
    "chars": 15210,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/Images.xcassets/AppIcon.appiconset/Contents.json",
    "chars": 585,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\""
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/Info.plist",
    "chars": 1221,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/TableViewController.h",
    "chars": 234,
    "preview": "//\n//  TableViewController.h\n//  EYTagView_Example\n//\n//  Created by ericyang on 10/11/15.\n//  Copyright © 2015 Eric Yan"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/TableViewController.m",
    "chars": 4166,
    "preview": "//\n//  TableViewController.m\n//  EYTagView_Example\n//\n//  Created by ericyang on 10/11/15.\n//  Copyright © 2015 Eric Yan"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/ViewController.h",
    "chars": 285,
    "preview": "//\n//  ViewController.h\n//  EYTagView_Example\n//\n//  Created by ericyang on 8/9/15.\n//  Copyright (c) 2015 Eric Yang. Al"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/ViewController.m",
    "chars": 3477,
    "preview": "//\n//  ViewController.m\n//  EYTagView_Example\n//\n//  Created by ericyang on 8/9/15.\n//  Copyright (c) 2015 Eric Yang. Al"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/en.lproj/Localizable.strings",
    "chars": 21,
    "preview": "\"Add Tag\"=\"Add Tag\";\n"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/main.m",
    "chars": 340,
    "preview": "//\n//  main.m\n//  EYTagView_Example\n//\n//  Created by ericyang on 8/9/15.\n//  Copyright (c) 2015 Eric Yang. All rights r"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/zh-Hans.lproj/LaunchScreen.strings",
    "chars": 310,
    "preview": "\n/* Class = \"UILabel\"; text = \"  Copyright (c) 2015 Eric Yang. All rights reserved.\"; ObjectID = \"8ie-xW-0ye\"; */\n\"8ie-x"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/zh-Hans.lproj/Localizable.strings",
    "chars": 18,
    "preview": "\"Add Tag\"=\"添加标签\";\n"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example/zh-Hans.lproj/Main.strings",
    "chars": 704,
    "preview": "\n/* Class = \"UILabel\"; text = \"auto layout test\"; ObjectID = \"LVG-rX-BcK\"; */\n\"LVG-rX-BcK.text\" = \"auto layout test\";\n\n/"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example.xcodeproj/project.pbxproj",
    "chars": 20375,
    "preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
  },
  {
    "path": "EYTagView_Example/EYTagView_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "chars": 162,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:EYTagView_Examp"
  },
  {
    "path": "EYTagView_Example/EYTagView_ExampleTests/EYTagView_ExampleTests.m",
    "chars": 895,
    "preview": "//\n//  EYTagView_ExampleTests.m\n//  EYTagView_ExampleTests\n//\n//  Created by ericyang on 8/9/15.\n//  Copyright (c) 2015 "
  },
  {
    "path": "EYTagView_Example/EYTagView_ExampleTests/Info.plist",
    "chars": 749,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "LICENSE",
    "chars": 11358,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "README.MD",
    "chars": 2098,
    "preview": "# EYTagView\n\n------\n\nEYTagView is a custome view simulate iOS Evernote's tag editing view.\n---\n\n####EYTagView is include"
  }
]

About this extraction

This page contains the full source code of the ygweric/EYTagView GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 26 files (95.9 KB), approximately 26.2k tokens, and a symbol index with 1 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!