├── .gitignore ├── LICENSE ├── README.md ├── TLTagsContol ├── TLTagsControl.h └── TLTagsControl.m ├── TLTagsControl.podspec ├── TagsInputSample.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── TagsInputSample.xccheckout │ └── xcuserdata │ │ └── qinyubo.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings └── xcuserdata │ └── qinyubo.xcuserdatad │ └── xcschemes │ ├── TagsInputSample.xcscheme │ └── xcschememanagement.plist ├── TagsInputSample ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m └── TagsInputSampleTests ├── Info.plist └── TagsInputSampleTests.m /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 ali312 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TLTagsControl 2 | A nice and simple tags input control for iOS. 3 | 4 | You are able to easily setup different colors for control elements and set different displaying modes 5 | 6 | #### Switching between displaying modes 7 | You are able to switch between displyaing modes by setting the **mode** property 8 | ``` 9 | @property (nonatomic) TLTagsControlMode mode; 10 | ``` 11 | 12 | ###### TLTagsControl has two displaying modes: 13 | ``` 14 | TLTagsControlModeEdit, 15 | ``` 16 | This mode allows user to input new tags and delete tags that are already presented. 17 | 18 | In this mode control will look like below: 19 | 20 | ![Screenshot](http://storage4.static.itmages.ru/i/15/0224/h_1424800428_8994378_a18f322acf.png) 21 | 22 | 23 | 24 | ``` 25 | TLTagsControlModeList, 26 | ``` 27 | This mode allows only listing of already presented tags 28 | 29 | In this mode control will look like below: 30 | 31 | ![Screenshot](http://storage1.static.itmages.ru/i/15/0224/h_1424800653_7670716_ed0f35f421.png) 32 | 33 | #### Setting different colors of control elements 34 | You are able to change colors of different element by setting these prperties 35 | ``` 36 | @property (nonatomic, strong) UIColor *tagsBackgroungColor; 37 | @property (nonatomic, strong) UIColor *tagsTextColor; 38 | @property (nonatomic, strong) UIColor *tagsDeleteButtonColor; 39 | ``` 40 | 41 | #### Applying changes 42 | 43 | To apply your changes you should call the method below 44 | 45 | ``` 46 | - (void)reloadTagSubviews; 47 | ``` 48 | 49 | ###### Example: 50 | 51 | ``` 52 | //assuming tagControl will be set initialized from stroryboard 53 | @interface ViewController () 54 | 55 | @property (nonatomic, strong) IBOutlet TLTagsControl *tagControl; 56 | 57 | @end 58 | 59 | .... 60 | 61 | @implementation ViewController 62 | 63 | - (void)viewDidLoad { 64 | [super viewDidLoad]; 65 | 66 | UIColor *blueBackgroundColor = [UIColor colorWithRed:75.0/255.0 green:186.0/255.0 blue:251.0/255.0 alpha:1]; 67 | UIColor *whiteTextColor = [UIColor whiteColor]; 68 | 69 | self.tagControl.tagsBackgroungColor = blueBackgroundColor; 70 | self.tagControl.tagsDeleteButtonColor = whiteTextColor; 71 | self.tagControl.tagsTextColor = whiteTextColor; 72 | 73 | self.tagControl.mode = TLTagsControlModeList; 74 | 75 | [self.tagControl reloadTagSubviews]; 76 | } 77 | 78 | @end 79 | ``` 80 | ![Screenshot](http://storage4.static.itmages.ru/i/15/0224/h_1424801491_9023273_164379e9bd.png) 81 | -------------------------------------------------------------------------------- /TLTagsContol/TLTagsControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // TLTagsControl.h 3 | // TagsInputSample 4 | // 5 | // Created by Антон Кузнецов on 11.02.15. 6 | // Copyright (c) 2015 TheLightPrjg. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TLTagsControl; 12 | 13 | @protocol TLTagsControlDelegate 14 | 15 | - (void)tagsControl:(TLTagsControl *)tagsControl tappedAtIndex:(NSInteger)index; 16 | - (void)tagsControl:(TLTagsControl *)tagsControl removedAtIndex:(NSInteger)index; 17 | 18 | @end 19 | 20 | typedef NS_ENUM(NSUInteger, TLTagsControlMode) { 21 | TLTagsControlModeEdit, 22 | TLTagsControlModeList, 23 | }; 24 | 25 | @interface TLTagsControl : UIScrollView 26 | 27 | @property (nonatomic, strong) NSMutableArray *tags; 28 | @property (nonatomic, strong) UIColor *tagsBackgroundColor; 29 | @property (nonatomic, strong) UIColor *tagsTextColor; 30 | @property (nonatomic, strong) UIColor *tagsDeleteButtonColor; 31 | @property (nonatomic, strong) NSString *tagPlaceholder; 32 | @property (nonatomic, strong) UIFont *font; 33 | @property (nonatomic) TLTagsControlMode mode; 34 | 35 | @property (assign, nonatomic) id tapDelegate; 36 | 37 | - (id)initWithFrame:(CGRect)frame andTags:(NSArray *)tags withTagsControlMode:(TLTagsControlMode)mode; 38 | 39 | - (void)addTag:(NSString *)tag; 40 | - (void)reloadTagSubviews; 41 | - (void)setKeyboardFocus; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /TLTagsContol/TLTagsControl.m: -------------------------------------------------------------------------------- 1 | // 2 | // TLTagsControl.m 3 | // TagsInputSample 4 | // 5 | // Created by Антон Кузнецов on 11.02.15. 6 | // Copyright (c) 2015 TheLightPrjg. All rights reserved. 7 | // 8 | 9 | #import "TLTagsControl.h" 10 | 11 | @interface TLTagsControl () 12 | 13 | @end 14 | 15 | @implementation TLTagsControl { 16 | UITextField *tagInputField_; 17 | NSMutableArray *tagSubviews_; 18 | } 19 | 20 | @synthesize tapDelegate; 21 | 22 | - (instancetype)init { 23 | self = [super init]; 24 | 25 | if (self != nil) { 26 | [self commonInit]; 27 | } 28 | 29 | return self; 30 | } 31 | 32 | - (instancetype)initWithFrame:(CGRect)frame { 33 | self = [super initWithFrame:frame]; 34 | 35 | if (self != nil) { 36 | [self commonInit]; 37 | } 38 | 39 | return self; 40 | } 41 | 42 | - (id)initWithFrame:(CGRect)frame andTags:(NSArray *)tags withTagsControlMode:(TLTagsControlMode)mode { 43 | self = [super initWithFrame:frame]; 44 | 45 | if (self != nil) { 46 | [self commonInit]; 47 | [self setTags:[[NSMutableArray alloc]initWithArray:tags]]; 48 | [self setMode:mode]; 49 | } 50 | 51 | return self; 52 | } 53 | 54 | - (id)initWithCoder:(NSCoder *)aDecoder { 55 | self = [super initWithCoder:aDecoder]; 56 | 57 | if (self != nil) { 58 | [self commonInit]; 59 | } 60 | 61 | return self; 62 | } 63 | 64 | - (void)commonInit { 65 | _tags = [NSMutableArray array]; 66 | 67 | self.layer.cornerRadius = 5; 68 | 69 | tagSubviews_ = [NSMutableArray array]; 70 | 71 | _font = [UIFont fontWithName:@"HelveticaNeue" size:14]; 72 | 73 | tagInputField_ = [[UITextField alloc] initWithFrame:self.frame]; 74 | tagInputField_.layer.cornerRadius = 5; 75 | tagInputField_.layer.borderColor = [UIColor lightGrayColor].CGColor; 76 | tagInputField_.backgroundColor = [UIColor whiteColor]; 77 | tagInputField_.delegate = self; 78 | tagInputField_.placeholder = @"tag"; 79 | tagInputField_.autocorrectionType = UITextAutocorrectionTypeNo; 80 | tagInputField_.font = _font; 81 | 82 | if (_mode == TLTagsControlModeEdit) { 83 | [self addSubview:tagInputField_]; 84 | } 85 | } 86 | 87 | #pragma mark - layout stuff 88 | 89 | - (void)layoutSubviews { 90 | [super layoutSubviews]; 91 | CGSize contentSize = self.contentSize; 92 | CGRect frame = CGRectMake(0, 0, 100, self.frame.size.height); 93 | CGRect tempViewFrame; 94 | NSInteger tagIndex = 0; 95 | for (UIView *view in tagSubviews_) { 96 | tempViewFrame = view.frame; 97 | NSInteger index = [tagSubviews_ indexOfObject:view]; 98 | if (index != 0) { 99 | UIView *prevView = tagSubviews_[index - 1]; 100 | tempViewFrame.origin.x = prevView.frame.origin.x + prevView.frame.size.width + 4; 101 | } else { 102 | tempViewFrame.origin.x = 0; 103 | } 104 | tempViewFrame.origin.y = frame.origin.y; 105 | view.frame = tempViewFrame; 106 | 107 | if (_mode == TLTagsControlModeList) { 108 | view.tag = tagIndex; 109 | 110 | UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(gestureAction:)]; 111 | [tapRecognizer setNumberOfTapsRequired:1]; 112 | [tapRecognizer setDelegate:self]; 113 | [view setUserInteractionEnabled:YES]; 114 | [view addGestureRecognizer:tapRecognizer]; 115 | } 116 | 117 | tagIndex++; 118 | } 119 | 120 | if (_mode == TLTagsControlModeEdit) { 121 | frame = tagInputField_.frame; 122 | frame.size.height = self.frame.size.height; 123 | frame.origin.y = 0; 124 | 125 | if (tagSubviews_.count == 0) { 126 | frame.origin.x = 7; 127 | } else { 128 | UIView *view = tagSubviews_.lastObject; 129 | frame.origin.x = view.frame.origin.x + view.frame.size.width + 4; 130 | } 131 | 132 | if (self.frame.size.width - tagInputField_.frame.origin.x > 100) { 133 | frame.size.width = self.frame.size.width - frame.origin.x - 12; 134 | } else { 135 | frame.size.width = 100; 136 | } 137 | tagInputField_.frame = frame; 138 | } else { 139 | UIView *lastTag = tagSubviews_.lastObject; 140 | if (lastTag != nil) { 141 | frame = lastTag.frame; 142 | } else { 143 | frame.origin.x = 7; 144 | } 145 | } 146 | 147 | contentSize.width = frame.origin.x + frame.size.width; 148 | contentSize.height = self.frame.size.height; 149 | 150 | self.contentSize = contentSize; 151 | 152 | tagInputField_.placeholder = (_tagPlaceholder == nil) ? @"tag" : _tagPlaceholder; 153 | } 154 | 155 | - (void)addTag:(NSString *)tag { 156 | for (NSString *oldTag in _tags) { 157 | if ([oldTag isEqualToString:tag]) { 158 | return; 159 | } 160 | } 161 | 162 | [_tags addObject:tag]; 163 | [self reloadTagSubviews]; 164 | 165 | CGSize contentSize = self.contentSize; 166 | CGPoint offset = self.contentOffset; 167 | 168 | if (contentSize.width > self.frame.size.width) { 169 | if (_mode == TLTagsControlModeEdit) { 170 | offset.x = tagInputField_.frame.origin.x + tagInputField_.frame.size.width - self.frame.size.width; 171 | } else { 172 | UIView *lastTag = tagSubviews_.lastObject; 173 | offset.x = lastTag.frame.origin.x + lastTag.frame.size.width - self.frame.size.width; 174 | } 175 | } else { 176 | offset.x = 0; 177 | } 178 | 179 | self.contentOffset = offset; 180 | } 181 | 182 | - (void)reloadTagSubviews { 183 | 184 | for (UIView *view in tagSubviews_) { 185 | [view removeFromSuperview]; 186 | } 187 | 188 | [tagSubviews_ removeAllObjects]; 189 | 190 | UIColor *tagBackgrounColor = _tagsBackgroundColor != nil ? _tagsBackgroundColor : [UIColor colorWithRed:0.9 191 | green:0.91 192 | blue:0.925 193 | alpha:1]; 194 | UIColor *tagTextColor = _tagsTextColor != nil ? _tagsTextColor : [UIColor darkGrayColor]; 195 | UIColor *tagDeleteButtonColor = _tagsDeleteButtonColor != nil ? _tagsDeleteButtonColor : [UIColor blackColor]; 196 | 197 | 198 | tagInputField_.font = self.font; 199 | 200 | for (NSString *tag in _tags) { 201 | float width = [tag boundingRectWithSize:CGSizeMake(3000,tagInputField_.frame.size.height) 202 | options:NSStringDrawingUsesLineFragmentOrigin 203 | attributes:@{NSFontAttributeName:self.font} 204 | context:nil].size.width; 205 | 206 | UIView *tagView = [[UIView alloc] initWithFrame:tagInputField_.frame]; 207 | CGRect tagFrame = tagView.frame; 208 | tagView.layer.cornerRadius = 5; 209 | tagFrame.origin.y = tagInputField_.frame.origin.y; 210 | tagView.backgroundColor = tagBackgrounColor; 211 | 212 | UILabel *tagLabel = [[UILabel alloc] init]; 213 | CGRect labelFrame = tagLabel.frame; 214 | tagLabel.font = self.font; 215 | labelFrame.size.width = width + 16; 216 | labelFrame.size.height = tagInputField_.frame.size.height; 217 | tagLabel.text = tag; 218 | tagLabel.textColor = tagTextColor; 219 | tagLabel.textAlignment = NSTextAlignmentCenter; 220 | tagLabel.clipsToBounds = YES; 221 | tagLabel.layer.cornerRadius = 5; 222 | 223 | if (_mode == TLTagsControlModeEdit) { 224 | UIButton *deleteTagButton = [[UIButton alloc] initWithFrame:tagInputField_.frame]; 225 | CGRect buttonFrame = deleteTagButton.frame; 226 | [deleteTagButton.titleLabel setFont:self.font]; 227 | [deleteTagButton addTarget:self action:@selector(deleteTagButton:) forControlEvents:UIControlEventTouchUpInside]; 228 | buttonFrame.size.width = deleteTagButton.frame.size.height; 229 | buttonFrame.size.height = tagInputField_.frame.size.height; 230 | [deleteTagButton setTag:tagSubviews_.count]; 231 | [deleteTagButton setTitle:@"✕" forState:UIControlStateNormal]; 232 | [deleteTagButton setTitleColor:tagDeleteButtonColor forState:UIControlStateNormal]; 233 | buttonFrame.origin.y = 0; 234 | buttonFrame.origin.x = labelFrame.size.width; 235 | 236 | deleteTagButton.frame = buttonFrame; 237 | tagFrame.size.width = labelFrame.size.width + buttonFrame.size.width; 238 | [tagView addSubview:deleteTagButton]; 239 | labelFrame.origin.x = 0; 240 | } else { 241 | tagFrame.size.width = labelFrame.size.width + 5; 242 | labelFrame.origin.x = (tagFrame.size.width - labelFrame.size.width) * 0.5; 243 | } 244 | 245 | [tagView addSubview:tagLabel]; 246 | labelFrame.origin.y = 0; 247 | UIView *lastView = tagSubviews_.lastObject; 248 | 249 | if (lastView != nil) { 250 | tagFrame.origin.x = lastView.frame.origin.x + lastView.frame.size.width + 4; 251 | } 252 | 253 | tagLabel.frame = labelFrame; 254 | tagView.frame = tagFrame; 255 | [tagSubviews_ addObject:tagView]; 256 | [self addSubview:tagView]; 257 | } 258 | 259 | 260 | if (_mode == TLTagsControlModeEdit) { 261 | if (tagInputField_.superview == nil) { 262 | [self addSubview:tagInputField_]; 263 | } 264 | CGRect frame = tagInputField_.frame; 265 | if (tagSubviews_.count == 0) { 266 | frame.origin.x = 7; 267 | } else { 268 | UIView *view = tagSubviews_.lastObject; 269 | frame.origin.x = view.frame.origin.x + view.frame.size.width + 4; 270 | } 271 | tagInputField_.frame = frame; 272 | 273 | } else { 274 | if (tagInputField_.superview != nil) { 275 | [tagInputField_ removeFromSuperview]; 276 | } 277 | } 278 | 279 | [self setNeedsLayout]; 280 | } 281 | 282 | #pragma mark - buttons handlers 283 | 284 | - (void)deleteTagButton:(UIButton *)sender { 285 | UIView *view = sender.superview; 286 | [view removeFromSuperview]; 287 | 288 | NSInteger index = [tagSubviews_ indexOfObject:view]; 289 | [_tags removeObjectAtIndex:index]; 290 | [self reloadTagSubviews]; 291 | 292 | if ([self.tapDelegate respondsToSelector:@selector(tagsControl:removedAtIndex:)]) { 293 | [self.tapDelegate tagsControl:self removedAtIndex:index]; 294 | } 295 | } 296 | 297 | - (void)tagButtonPressed:(id)sender { 298 | UIButton *button = sender; 299 | 300 | tagInputField_.text = @""; 301 | [self addTag:button.titleLabel.text]; 302 | } 303 | 304 | #pragma mark - textfield stuff 305 | 306 | - (BOOL)textFieldShouldReturn:(UITextField *)textField { 307 | if (textField.text.length > 0) { 308 | NSString *tag = textField.text; 309 | textField.text = @""; 310 | [self addTag:tag]; 311 | } 312 | 313 | return YES; 314 | } 315 | 316 | - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { 317 | NSString *resultingString; 318 | NSString *text = textField.text; 319 | 320 | 321 | if (string.length == 1 && [string rangeOfCharacterFromSet:[[NSCharacterSet alphanumericCharacterSet] invertedSet]].location != NSNotFound) { 322 | return NO; 323 | } else { 324 | if (!text || [text isEqualToString:@""]) { 325 | resultingString = string; 326 | } else { 327 | if (range.location + range.length > text.length) { 328 | range.length = text.length - range.location; 329 | } 330 | 331 | resultingString = [textField.text stringByReplacingCharactersInRange:range 332 | withString:string]; 333 | } 334 | 335 | NSArray *components = [resultingString componentsSeparatedByCharactersInSet:[[NSCharacterSet alphanumericCharacterSet] invertedSet]]; 336 | 337 | if (components.count > 2) { 338 | for (NSString *component in components) { 339 | if (component.length > 0 && [component rangeOfCharacterFromSet:[[NSCharacterSet alphanumericCharacterSet] invertedSet]].location == NSNotFound) { 340 | [self addTag:component]; 341 | break; 342 | } 343 | } 344 | 345 | return NO; 346 | } 347 | 348 | return YES; 349 | } 350 | } 351 | 352 | #pragma mark - other 353 | 354 | - (void)setMode:(TLTagsControlMode)mode { 355 | _mode = mode; 356 | } 357 | 358 | - (void)setTags:(NSMutableArray *)tags { 359 | _tags = tags; 360 | } 361 | 362 | - (void)setPlaceholder:(NSString *)tagPlaceholder { 363 | _tagPlaceholder = tagPlaceholder; 364 | } 365 | 366 | - (void)gestureAction:(id)sender { 367 | UITapGestureRecognizer *tapRecognizer = (UITapGestureRecognizer *)sender; 368 | if ([self.tapDelegate respondsToSelector:@selector(tagsControl:tappedAtIndex:)]) { 369 | [tapDelegate tagsControl:self tappedAtIndex:tapRecognizer.view.tag]; 370 | } 371 | } 372 | - (void)setKeyboardFocus { 373 | [tagInputField_ becomeFirstResponder]; 374 | } 375 | @end 376 | -------------------------------------------------------------------------------- /TLTagsControl.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'TLTagsControl' 3 | s.version = '1.0.0' 4 | s.license = { :type => 'MIT', :file => 'LICENSE' } 5 | s.authors = { 'ali312' => 'https://github.com/ali312' } 6 | s.summary = 'A nice and simple tags input control for iOS' 7 | s.homepage = 'https://github.com/ali312/TLTagsControl' 8 | 9 | # Source Info 10 | s.platform = :ios, '6.1' 11 | s.source = { :git => 'https://github.com/ali312/TLTagsControl', :branch => 'master' } 12 | s.source_files = 'TLTagsContol/TLTagsControl.{h,m}' 13 | s.requires_arc = true 14 | end 15 | -------------------------------------------------------------------------------- /TagsInputSample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | ED8250A41A8A91E000528293 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ED8250A31A8A91E000528293 /* main.m */; }; 11 | ED8250A71A8A91E000528293 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = ED8250A61A8A91E000528293 /* AppDelegate.m */; }; 12 | ED8250AA1A8A91E000528293 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ED8250A91A8A91E000528293 /* ViewController.m */; }; 13 | ED8250AD1A8A91E000528293 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ED8250AB1A8A91E000528293 /* Main.storyboard */; }; 14 | ED8250AF1A8A91E000528293 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ED8250AE1A8A91E000528293 /* Images.xcassets */; }; 15 | ED8250B21A8A91E000528293 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = ED8250B01A8A91E000528293 /* LaunchScreen.xib */; }; 16 | ED8250BE1A8A91E000528293 /* TagsInputSampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = ED8250BD1A8A91E000528293 /* TagsInputSampleTests.m */; }; 17 | ED8250CA1A8A927A00528293 /* TLTagsControl.m in Sources */ = {isa = PBXBuildFile; fileRef = ED8250C91A8A927A00528293 /* TLTagsControl.m */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | ED8250B81A8A91E000528293 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = ED8250961A8A91DF00528293 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = ED82509D1A8A91E000528293; 26 | remoteInfo = TagsInputSample; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | ED82509E1A8A91E000528293 /* TagsInputSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TagsInputSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | ED8250A21A8A91E000528293 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | ED8250A31A8A91E000528293 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 34 | ED8250A51A8A91E000528293 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 35 | ED8250A61A8A91E000528293 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 36 | ED8250A81A8A91E000528293 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 37 | ED8250A91A8A91E000528293 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 38 | ED8250AC1A8A91E000528293 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 39 | ED8250AE1A8A91E000528293 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 40 | ED8250B11A8A91E000528293 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 41 | ED8250B71A8A91E000528293 /* TagsInputSampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TagsInputSampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | ED8250BC1A8A91E000528293 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | ED8250BD1A8A91E000528293 /* TagsInputSampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TagsInputSampleTests.m; sourceTree = ""; }; 44 | ED8250C81A8A927A00528293 /* TLTagsControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TLTagsControl.h; path = TLTagsContol/TLTagsControl.h; sourceTree = SOURCE_ROOT; }; 45 | ED8250C91A8A927A00528293 /* TLTagsControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TLTagsControl.m; path = TLTagsContol/TLTagsControl.m; sourceTree = SOURCE_ROOT; }; 46 | /* End PBXFileReference section */ 47 | 48 | /* Begin PBXFrameworksBuildPhase section */ 49 | ED82509B1A8A91E000528293 /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | ED8250B41A8A91E000528293 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXFrameworksBuildPhase section */ 64 | 65 | /* Begin PBXGroup section */ 66 | ED8250951A8A91DF00528293 = { 67 | isa = PBXGroup; 68 | children = ( 69 | ED8250C71A8A923600528293 /* TLTagsControl */, 70 | ED8250A01A8A91E000528293 /* TagsInputSample */, 71 | ED8250BA1A8A91E000528293 /* TagsInputSampleTests */, 72 | ED82509F1A8A91E000528293 /* Products */, 73 | ); 74 | sourceTree = ""; 75 | }; 76 | ED82509F1A8A91E000528293 /* Products */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | ED82509E1A8A91E000528293 /* TagsInputSample.app */, 80 | ED8250B71A8A91E000528293 /* TagsInputSampleTests.xctest */, 81 | ); 82 | name = Products; 83 | sourceTree = ""; 84 | }; 85 | ED8250A01A8A91E000528293 /* TagsInputSample */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | ED8250A51A8A91E000528293 /* AppDelegate.h */, 89 | ED8250A61A8A91E000528293 /* AppDelegate.m */, 90 | ED8250A81A8A91E000528293 /* ViewController.h */, 91 | ED8250A91A8A91E000528293 /* ViewController.m */, 92 | ED8250AB1A8A91E000528293 /* Main.storyboard */, 93 | ED8250AE1A8A91E000528293 /* Images.xcassets */, 94 | ED8250B01A8A91E000528293 /* LaunchScreen.xib */, 95 | ED8250A11A8A91E000528293 /* Supporting Files */, 96 | ); 97 | path = TagsInputSample; 98 | sourceTree = ""; 99 | }; 100 | ED8250A11A8A91E000528293 /* Supporting Files */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | ED8250A21A8A91E000528293 /* Info.plist */, 104 | ED8250A31A8A91E000528293 /* main.m */, 105 | ); 106 | name = "Supporting Files"; 107 | sourceTree = ""; 108 | }; 109 | ED8250BA1A8A91E000528293 /* TagsInputSampleTests */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | ED8250BD1A8A91E000528293 /* TagsInputSampleTests.m */, 113 | ED8250BB1A8A91E000528293 /* Supporting Files */, 114 | ); 115 | path = TagsInputSampleTests; 116 | sourceTree = ""; 117 | }; 118 | ED8250BB1A8A91E000528293 /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | ED8250BC1A8A91E000528293 /* Info.plist */, 122 | ); 123 | name = "Supporting Files"; 124 | sourceTree = ""; 125 | }; 126 | ED8250C71A8A923600528293 /* TLTagsControl */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | ED8250C81A8A927A00528293 /* TLTagsControl.h */, 130 | ED8250C91A8A927A00528293 /* TLTagsControl.m */, 131 | ); 132 | name = TLTagsControl; 133 | path = TagsInputSample; 134 | sourceTree = ""; 135 | }; 136 | /* End PBXGroup section */ 137 | 138 | /* Begin PBXNativeTarget section */ 139 | ED82509D1A8A91E000528293 /* TagsInputSample */ = { 140 | isa = PBXNativeTarget; 141 | buildConfigurationList = ED8250C11A8A91E000528293 /* Build configuration list for PBXNativeTarget "TagsInputSample" */; 142 | buildPhases = ( 143 | ED82509A1A8A91E000528293 /* Sources */, 144 | ED82509B1A8A91E000528293 /* Frameworks */, 145 | ED82509C1A8A91E000528293 /* Resources */, 146 | ); 147 | buildRules = ( 148 | ); 149 | dependencies = ( 150 | ); 151 | name = TagsInputSample; 152 | productName = TagsInputSample; 153 | productReference = ED82509E1A8A91E000528293 /* TagsInputSample.app */; 154 | productType = "com.apple.product-type.application"; 155 | }; 156 | ED8250B61A8A91E000528293 /* TagsInputSampleTests */ = { 157 | isa = PBXNativeTarget; 158 | buildConfigurationList = ED8250C41A8A91E000528293 /* Build configuration list for PBXNativeTarget "TagsInputSampleTests" */; 159 | buildPhases = ( 160 | ED8250B31A8A91E000528293 /* Sources */, 161 | ED8250B41A8A91E000528293 /* Frameworks */, 162 | ED8250B51A8A91E000528293 /* Resources */, 163 | ); 164 | buildRules = ( 165 | ); 166 | dependencies = ( 167 | ED8250B91A8A91E000528293 /* PBXTargetDependency */, 168 | ); 169 | name = TagsInputSampleTests; 170 | productName = TagsInputSampleTests; 171 | productReference = ED8250B71A8A91E000528293 /* TagsInputSampleTests.xctest */; 172 | productType = "com.apple.product-type.bundle.unit-test"; 173 | }; 174 | /* End PBXNativeTarget section */ 175 | 176 | /* Begin PBXProject section */ 177 | ED8250961A8A91DF00528293 /* Project object */ = { 178 | isa = PBXProject; 179 | attributes = { 180 | LastUpgradeCheck = 0610; 181 | ORGANIZATIONNAME = TheLightPrjg; 182 | TargetAttributes = { 183 | ED82509D1A8A91E000528293 = { 184 | CreatedOnToolsVersion = 6.1; 185 | }; 186 | ED8250B61A8A91E000528293 = { 187 | CreatedOnToolsVersion = 6.1; 188 | TestTargetID = ED82509D1A8A91E000528293; 189 | }; 190 | }; 191 | }; 192 | buildConfigurationList = ED8250991A8A91DF00528293 /* Build configuration list for PBXProject "TagsInputSample" */; 193 | compatibilityVersion = "Xcode 3.2"; 194 | developmentRegion = English; 195 | hasScannedForEncodings = 0; 196 | knownRegions = ( 197 | en, 198 | Base, 199 | ); 200 | mainGroup = ED8250951A8A91DF00528293; 201 | productRefGroup = ED82509F1A8A91E000528293 /* Products */; 202 | projectDirPath = ""; 203 | projectRoot = ""; 204 | targets = ( 205 | ED82509D1A8A91E000528293 /* TagsInputSample */, 206 | ED8250B61A8A91E000528293 /* TagsInputSampleTests */, 207 | ); 208 | }; 209 | /* End PBXProject section */ 210 | 211 | /* Begin PBXResourcesBuildPhase section */ 212 | ED82509C1A8A91E000528293 /* Resources */ = { 213 | isa = PBXResourcesBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | ED8250AD1A8A91E000528293 /* Main.storyboard in Resources */, 217 | ED8250B21A8A91E000528293 /* LaunchScreen.xib in Resources */, 218 | ED8250AF1A8A91E000528293 /* Images.xcassets in Resources */, 219 | ); 220 | runOnlyForDeploymentPostprocessing = 0; 221 | }; 222 | ED8250B51A8A91E000528293 /* Resources */ = { 223 | isa = PBXResourcesBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | }; 229 | /* End PBXResourcesBuildPhase section */ 230 | 231 | /* Begin PBXSourcesBuildPhase section */ 232 | ED82509A1A8A91E000528293 /* Sources */ = { 233 | isa = PBXSourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | ED8250AA1A8A91E000528293 /* ViewController.m in Sources */, 237 | ED8250A71A8A91E000528293 /* AppDelegate.m in Sources */, 238 | ED8250CA1A8A927A00528293 /* TLTagsControl.m in Sources */, 239 | ED8250A41A8A91E000528293 /* main.m in Sources */, 240 | ); 241 | runOnlyForDeploymentPostprocessing = 0; 242 | }; 243 | ED8250B31A8A91E000528293 /* Sources */ = { 244 | isa = PBXSourcesBuildPhase; 245 | buildActionMask = 2147483647; 246 | files = ( 247 | ED8250BE1A8A91E000528293 /* TagsInputSampleTests.m in Sources */, 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | }; 251 | /* End PBXSourcesBuildPhase section */ 252 | 253 | /* Begin PBXTargetDependency section */ 254 | ED8250B91A8A91E000528293 /* PBXTargetDependency */ = { 255 | isa = PBXTargetDependency; 256 | target = ED82509D1A8A91E000528293 /* TagsInputSample */; 257 | targetProxy = ED8250B81A8A91E000528293 /* PBXContainerItemProxy */; 258 | }; 259 | /* End PBXTargetDependency section */ 260 | 261 | /* Begin PBXVariantGroup section */ 262 | ED8250AB1A8A91E000528293 /* Main.storyboard */ = { 263 | isa = PBXVariantGroup; 264 | children = ( 265 | ED8250AC1A8A91E000528293 /* Base */, 266 | ); 267 | name = Main.storyboard; 268 | sourceTree = ""; 269 | }; 270 | ED8250B01A8A91E000528293 /* LaunchScreen.xib */ = { 271 | isa = PBXVariantGroup; 272 | children = ( 273 | ED8250B11A8A91E000528293 /* Base */, 274 | ); 275 | name = LaunchScreen.xib; 276 | sourceTree = ""; 277 | }; 278 | /* End PBXVariantGroup section */ 279 | 280 | /* Begin XCBuildConfiguration section */ 281 | ED8250BF1A8A91E000528293 /* Debug */ = { 282 | isa = XCBuildConfiguration; 283 | buildSettings = { 284 | ALWAYS_SEARCH_USER_PATHS = NO; 285 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 286 | CLANG_CXX_LIBRARY = "libc++"; 287 | CLANG_ENABLE_MODULES = YES; 288 | CLANG_ENABLE_OBJC_ARC = YES; 289 | CLANG_WARN_BOOL_CONVERSION = YES; 290 | CLANG_WARN_CONSTANT_CONVERSION = YES; 291 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 292 | CLANG_WARN_EMPTY_BODY = YES; 293 | CLANG_WARN_ENUM_CONVERSION = YES; 294 | CLANG_WARN_INT_CONVERSION = YES; 295 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 296 | CLANG_WARN_UNREACHABLE_CODE = YES; 297 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 298 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 299 | COPY_PHASE_STRIP = NO; 300 | ENABLE_STRICT_OBJC_MSGSEND = YES; 301 | GCC_C_LANGUAGE_STANDARD = gnu99; 302 | GCC_DYNAMIC_NO_PIC = NO; 303 | GCC_OPTIMIZATION_LEVEL = 0; 304 | GCC_PREPROCESSOR_DEFINITIONS = ( 305 | "DEBUG=1", 306 | "$(inherited)", 307 | ); 308 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 309 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 310 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 311 | GCC_WARN_UNDECLARED_SELECTOR = YES; 312 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 313 | GCC_WARN_UNUSED_FUNCTION = YES; 314 | GCC_WARN_UNUSED_VARIABLE = YES; 315 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 316 | MTL_ENABLE_DEBUG_INFO = YES; 317 | ONLY_ACTIVE_ARCH = YES; 318 | SDKROOT = iphoneos; 319 | }; 320 | name = Debug; 321 | }; 322 | ED8250C01A8A91E000528293 /* Release */ = { 323 | isa = XCBuildConfiguration; 324 | buildSettings = { 325 | ALWAYS_SEARCH_USER_PATHS = NO; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BOOL_CONVERSION = YES; 331 | CLANG_WARN_CONSTANT_CONVERSION = YES; 332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 333 | CLANG_WARN_EMPTY_BODY = YES; 334 | CLANG_WARN_ENUM_CONVERSION = YES; 335 | CLANG_WARN_INT_CONVERSION = YES; 336 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 337 | CLANG_WARN_UNREACHABLE_CODE = YES; 338 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 339 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 340 | COPY_PHASE_STRIP = YES; 341 | ENABLE_NS_ASSERTIONS = NO; 342 | ENABLE_STRICT_OBJC_MSGSEND = YES; 343 | GCC_C_LANGUAGE_STANDARD = gnu99; 344 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 345 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 346 | GCC_WARN_UNDECLARED_SELECTOR = YES; 347 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 348 | GCC_WARN_UNUSED_FUNCTION = YES; 349 | GCC_WARN_UNUSED_VARIABLE = YES; 350 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 351 | MTL_ENABLE_DEBUG_INFO = NO; 352 | SDKROOT = iphoneos; 353 | VALIDATE_PRODUCT = YES; 354 | }; 355 | name = Release; 356 | }; 357 | ED8250C21A8A91E000528293 /* Debug */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 361 | INFOPLIST_FILE = TagsInputSample/Info.plist; 362 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 363 | PRODUCT_NAME = "$(TARGET_NAME)"; 364 | }; 365 | name = Debug; 366 | }; 367 | ED8250C31A8A91E000528293 /* Release */ = { 368 | isa = XCBuildConfiguration; 369 | buildSettings = { 370 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 371 | INFOPLIST_FILE = TagsInputSample/Info.plist; 372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 373 | PRODUCT_NAME = "$(TARGET_NAME)"; 374 | }; 375 | name = Release; 376 | }; 377 | ED8250C51A8A91E000528293 /* Debug */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | BUNDLE_LOADER = "$(TEST_HOST)"; 381 | FRAMEWORK_SEARCH_PATHS = ( 382 | "$(SDKROOT)/Developer/Library/Frameworks", 383 | "$(inherited)", 384 | ); 385 | GCC_PREPROCESSOR_DEFINITIONS = ( 386 | "DEBUG=1", 387 | "$(inherited)", 388 | ); 389 | INFOPLIST_FILE = TagsInputSampleTests/Info.plist; 390 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 391 | PRODUCT_NAME = "$(TARGET_NAME)"; 392 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TagsInputSample.app/TagsInputSample"; 393 | }; 394 | name = Debug; 395 | }; 396 | ED8250C61A8A91E000528293 /* Release */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | BUNDLE_LOADER = "$(TEST_HOST)"; 400 | FRAMEWORK_SEARCH_PATHS = ( 401 | "$(SDKROOT)/Developer/Library/Frameworks", 402 | "$(inherited)", 403 | ); 404 | INFOPLIST_FILE = TagsInputSampleTests/Info.plist; 405 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 406 | PRODUCT_NAME = "$(TARGET_NAME)"; 407 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TagsInputSample.app/TagsInputSample"; 408 | }; 409 | name = Release; 410 | }; 411 | /* End XCBuildConfiguration section */ 412 | 413 | /* Begin XCConfigurationList section */ 414 | ED8250991A8A91DF00528293 /* Build configuration list for PBXProject "TagsInputSample" */ = { 415 | isa = XCConfigurationList; 416 | buildConfigurations = ( 417 | ED8250BF1A8A91E000528293 /* Debug */, 418 | ED8250C01A8A91E000528293 /* Release */, 419 | ); 420 | defaultConfigurationIsVisible = 0; 421 | defaultConfigurationName = Release; 422 | }; 423 | ED8250C11A8A91E000528293 /* Build configuration list for PBXNativeTarget "TagsInputSample" */ = { 424 | isa = XCConfigurationList; 425 | buildConfigurations = ( 426 | ED8250C21A8A91E000528293 /* Debug */, 427 | ED8250C31A8A91E000528293 /* Release */, 428 | ); 429 | defaultConfigurationIsVisible = 0; 430 | }; 431 | ED8250C41A8A91E000528293 /* Build configuration list for PBXNativeTarget "TagsInputSampleTests" */ = { 432 | isa = XCConfigurationList; 433 | buildConfigurations = ( 434 | ED8250C51A8A91E000528293 /* Debug */, 435 | ED8250C61A8A91E000528293 /* Release */, 436 | ); 437 | defaultConfigurationIsVisible = 0; 438 | }; 439 | /* End XCConfigurationList section */ 440 | }; 441 | rootObject = ED8250961A8A91DF00528293 /* Project object */; 442 | } 443 | -------------------------------------------------------------------------------- /TagsInputSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TagsInputSample.xcodeproj/project.xcworkspace/xcshareddata/TagsInputSample.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | B5E53F1A-0752-49BB-BA88-10C65F59EEAF 9 | IDESourceControlProjectName 10 | TagsInputSample 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 50811F1785D4DD628C51E3FB19BF2C6E0420EF0A 14 | https://github.com/xnth97/TLTagsControl.git 15 | 16 | IDESourceControlProjectPath 17 | TagsInputSample.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 50811F1785D4DD628C51E3FB19BF2C6E0420EF0A 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/xnth97/TLTagsControl.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 50811F1785D4DD628C51E3FB19BF2C6E0420EF0A 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 50811F1785D4DD628C51E3FB19BF2C6E0420EF0A 36 | IDESourceControlWCCName 37 | TLTagsControl 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /TagsInputSample.xcodeproj/project.xcworkspace/xcuserdata/qinyubo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ali312/TLTagsControl/bfb0b43d5613d1709372adf654aa4dafbbf5a26e/TagsInputSample.xcodeproj/project.xcworkspace/xcuserdata/qinyubo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TagsInputSample.xcodeproj/project.xcworkspace/xcuserdata/qinyubo.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TagsInputSample.xcodeproj/xcuserdata/qinyubo.xcuserdatad/xcschemes/TagsInputSample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /TagsInputSample.xcodeproj/xcuserdata/qinyubo.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TagsInputSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | ED82509D1A8A91E000528293 16 | 17 | primary 18 | 19 | 20 | ED8250B61A8A91E000528293 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /TagsInputSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // TagsInputSample 4 | // 5 | // Created by Антон Кузнецов on 11.02.15. 6 | // Copyright (c) 2015 TheLightPrjg. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /TagsInputSample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // TagsInputSample 4 | // 5 | // Created by Антон Кузнецов on 11.02.15. 6 | // Copyright (c) 2015 TheLightPrjg. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // 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. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // 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. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /TagsInputSample/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /TagsInputSample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /TagsInputSample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /TagsInputSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.thelightprj.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /TagsInputSample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // TagsInputSample 4 | // 5 | // Created by Антон Кузнецов on 11.02.15. 6 | // Copyright (c) 2015 TheLightPrjg. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /TagsInputSample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // TagsInputSample 4 | // 5 | // Created by Антон Кузнецов on 11.02.15. 6 | // Copyright (c) 2015 TheLightPrjg. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "TLTagsControl.h" 11 | @interface ViewController () 12 | 13 | @property (nonatomic, strong) IBOutlet TLTagsControl *defaultEditingTagControl; 14 | @property (nonatomic, strong) IBOutlet TLTagsControl *blueEditingTagControl; 15 | @property (nonatomic, strong) IBOutlet TLTagsControl *redEditingTagControl; 16 | @property (nonatomic, strong) IBOutlet TLTagsControl *defauldListingTagControl; 17 | @property (nonatomic, strong) IBOutlet TLTagsControl *blueListingTagControl; 18 | @property (nonatomic, strong) IBOutlet TLTagsControl *redListingTagControl; 19 | 20 | @end 21 | 22 | @implementation ViewController { 23 | TLTagsControl *demoTagsControl; 24 | } 25 | 26 | - (void)viewDidLoad { 27 | [super viewDidLoad]; 28 | // Do any additional setup after loading the view, typically from a nib. 29 | NSMutableArray *tags = [NSMutableArray arrayWithArray:@[@"A", @"Tag", @"One", @"More", @"Tag", @"And", @"Yet", @"Another", @"One"]]; 30 | _defaultEditingTagControl.tags = [tags mutableCopy]; 31 | _blueEditingTagControl.tags = [tags mutableCopy]; 32 | _redEditingTagControl.tags = [tags mutableCopy]; 33 | _defaultEditingTagControl.tagPlaceholder = @"Placeholder"; 34 | 35 | _defauldListingTagControl.tags = [tags mutableCopy]; 36 | _blueListingTagControl.tags = [tags mutableCopy]; 37 | _redListingTagControl.tags = [tags mutableCopy]; 38 | 39 | _defauldListingTagControl.mode = TLTagsControlModeList; 40 | _blueListingTagControl.mode = TLTagsControlModeList; 41 | _redListingTagControl.mode = TLTagsControlModeList; 42 | 43 | UIColor *blueBackgroundColor = [UIColor colorWithRed:75.0/255.0 green:186.0/255.0 blue:251.0/255.0 alpha:1]; 44 | UIColor *redBackgroundColor = [UIColor colorWithRed:233.0/255.0 green:70.0/255.0 blue:78.0/255.0 alpha:1]; 45 | UIColor *darkRedButtonColor = [UIColor colorWithRed:250.0/255.0 green:140.0/255.0 blue:140.0/255.0 alpha:1]; 46 | UIColor *whiteTextColor = [UIColor whiteColor]; 47 | 48 | _blueEditingTagControl.tagsBackgroundColor = blueBackgroundColor; 49 | _blueEditingTagControl.tagsDeleteButtonColor = whiteTextColor; 50 | _blueEditingTagControl.tagsTextColor = whiteTextColor; 51 | 52 | _blueListingTagControl.tagsBackgroundColor = blueBackgroundColor; 53 | _blueListingTagControl.tagsTextColor = whiteTextColor; 54 | 55 | _redEditingTagControl.tagsBackgroundColor = redBackgroundColor; 56 | _redEditingTagControl.tagsDeleteButtonColor = darkRedButtonColor; 57 | _redEditingTagControl.tagsTextColor = whiteTextColor; 58 | 59 | _redListingTagControl.tagsBackgroundColor = redBackgroundColor; 60 | _redListingTagControl.tagsTextColor = whiteTextColor; 61 | 62 | [_defaultEditingTagControl reloadTagSubviews]; 63 | [_blueEditingTagControl reloadTagSubviews]; 64 | [_redEditingTagControl reloadTagSubviews]; 65 | [_defauldListingTagControl reloadTagSubviews]; 66 | [_blueListingTagControl reloadTagSubviews]; 67 | [_redListingTagControl reloadTagSubviews]; 68 | [_redListingTagControl setTapDelegate:self]; 69 | 70 | demoTagsControl = [[TLTagsControl alloc]initWithFrame:CGRectMake(8, 340, self.view.frame.size.width - 16, 36) 71 | andTags:@[@"These", @"Tags", @"Are", @"Tapable"] 72 | withTagsControlMode:TLTagsControlModeList]; 73 | 74 | [demoTagsControl reloadTagSubviews]; 75 | [demoTagsControl setTapDelegate:self]; 76 | [self.view addSubview:demoTagsControl]; 77 | } 78 | 79 | - (void)didReceiveMemoryWarning { 80 | [super didReceiveMemoryWarning]; 81 | // Dispose of any resources that can be recreated. 82 | } 83 | 84 | #pragma mark - TLTagsControlDelegate 85 | - (void)tagsControl:(TLTagsControl *)tagsControl tappedAtIndex:(NSInteger)index { 86 | NSLog(@"Tag \"%@\" was tapped", tagsControl.tags[index]); 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /TagsInputSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TagsInputSample 4 | // 5 | // Created by Антон Кузнецов on 11.02.15. 6 | // Copyright (c) 2015 TheLightPrjg. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /TagsInputSampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.thelightprj.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /TagsInputSampleTests/TagsInputSampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // TagsInputSampleTests.m 3 | // TagsInputSampleTests 4 | // 5 | // Created by Антон Кузнецов on 11.02.15. 6 | // Copyright (c) 2015 TheLightPrjg. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface TagsInputSampleTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation TagsInputSampleTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | --------------------------------------------------------------------------------