Code Monkey home page Code Monkey logo

tltagscontrol's People

Contributors

ali312 avatar antonkuznetsov avatar bryant1410 avatar crisgarner avatar lucianboboc avatar mohlman3 avatar paulleo avatar xnth97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tltagscontrol's Issues

Application crashed on selection of delete Tag

i just installed the application & when i am performing the delete operation on first row of tags, it performed perfectly. But when i started with second row of tag, application crashed throwing an exception.

2015-04-24 13:06:17.474 TagsInputSample[2048:42802] * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[**NSArrayM removeObjectAtIndex:]: index 0 beyond bounds for empty array'
* First throw call stack:
(
0 CoreFoundation 0x000000010fddea75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010fa77bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010fd086a0 CFBundleCopyPreferredLocalizationsFromArray + 0
3 TagsInputSample 0x000000010f542c12 -[TLTagsControl deleteTagButton:] + 194
4 UIKit 0x00000001101cfa22 -[UIApplication sendAction:to:from:forEvent:] + 75
5 UIKit 0x00000001102d6e50 -[UIControl _sendActionsForEvents:withEvent:] + 467
6 UIKit 0x00000001102d621f -[UIControl touchesEnded:withEvent:] + 522
7 UIKit 0x000000011057de80 _UIGestureRecognizerUpdate + 9487
8 UIKit 0x0000000110215856 -[UIWindow _sendGesturesForEvent:] + 1041
9 UIKit 0x0000000110216483 -[UIWindow sendEvent:] + 667
10 UIKit 0x00000001101e2fb1 -[UIApplication sendEvent:] + 246
11 UIKit 0x00000001101f0227 _UIApplicationHandleEventFromQueueEvent + 17700
12 UIKit 0x00000001101cb23c _UIApplicationHandleEventQueue + 2066
13 CoreFoundation 0x000000010fd13c91 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
+ 17
14 CoreFoundation 0x000000010fd09b5d __CFRunLoopDoSources0 + 269
15 CoreFoundation 0x000000010fd09194 __CFRunLoopRun + 868
16 CoreFoundation 0x000000010fd08bc6 CFRunLoopRunSpecific + 470
17 GraphicsServices 0x00000001133bba58 GSEventRunModal + 161
18 UIKit 0x00000001101ce580 UIApplicationMain + 1282
19 TagsInputSample 0x000000010f543a23 main + 115
20 libdyld.dylib 0x000000011238c145 start + 1
21 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Ability to show a tag without the delete button

Hey there! Great control! I love it and plan on using it in a project, but I'd really like the ability to globally turn off the delete button on all tags (for when i'm displaying a list of tags instead of adding/editing tags)

Thanks again!

validating tags without pressing return key

I'm working on a mail client, and i want to auto adding tags (when leaving the filed that contain the destination email) without pressing return key enter.

I mean may be pass directly to writing the email without pressing return key to add the tag

Cannot remove tags programmatically. Decide to add tag or not after pressing return key.

So I have this situation where duplicate tags are not allowed. So I was trying to check if the tag is already present in tags array and then decide If I want to add tag or not. But I cannot control what happens on pressing return.
So I thought I, let the tag get added. I will check for the duplicate after that, and if present, I will programmatically remove it but there is no provision for that too.
If possible, can you please address this issue? At least support for removing tags programmatically.

isFirstResponder

Calling if ([self.tagsControlView isFirstResponder]) in textFieldDidBeginEditing: doesn't return anything. I have all my proper delegates assigned in viewDidLoad of the view controller I put the tagsControlView in. What's the proper way to see if the textField in tagsControlView is first responder?

Return the list of tags

Hello!

Thank you for such a great controller! I wanted to ask you if there is any way to return the list of tags by button click?

Scrolling Issue.

In sample application , if you scroll the demoTagsControl several time it will get stuck and will stop scrolling anymore.

Please help.

Layer Issue

When i am using in tableview cell then will showing white background. which unnecessary

Can not remove/ add new tags in swift.

Currently using this library in one of my swift project. When trying to remove or add tags programatically it throws [Swift._SwiftDeferredNSArray removeObjectAtIndex:]: error when remove and -[Swift._SwiftDeferredNSArray addObject:]:

Please help.

Using Storyboard and creating tagArray....

Nice control.

FYI I'm not by any means a programmer so after a few hours of banging the keyboard on trying to implement this control in storyboard UIScrollView, I wanted to let anyone struggling like me on how to implement this and capture the selected and added tags in an array...

  1. Add TLSTagControl.h & TLSTagControl.m in you project
  2. Add the to your interface
  3. Create an NSArray object in your interface
// This hold the array of pre-defined tags a user can select
*     NSArray *customerTagArray;
  1. Drag 2 UIScroll views on your storyboard and create IBOutlets for each:

    // This is the UIScrollView that will populate with selected tags and new tags the user can add

  • @Property (strong, nonatomic) IBOutlet TLTagsControl *selectedTagView;

    // This is the UIScrollView that provides user pre-defined tags to select
    *@Property (strong, nonatomic) IBOutlet TLTagsControl *tagView;

  1. In your viewController.m viewDidLoad:
      // This is the UIScrollView that will populate with selected tags and new tags the user can add
      _selectedTagView.mode = TLTagsControlModeEdit;
      _selectedTagView.tagPlaceholder = @"Add Tag";
     [_selectedTagView reloadTagSubviews];

      // This is the UIScrollView that provides user pre-defined tags to select
      _viewCustomerTags.mode = TLTagsControlModeList;
     customerTagArray = [NSMutableArray arrayWithArray:@[@"A", @"Tag", @"One", @"More", @"Tag", @"And", @"Yet", @"Another", @"One"]];
      _viewCustomerTags.tags = [customerTagArray mutableCopy];
     [_viewCustomerTags reloadTagSubviews];
     [_viewCustomerTags setTapDelegate:self];
  1. In your viewController.m add this delegate method:
  • (void)tagsControl:(TLTagsControl *)tagsControl tappedAtIndex:(NSInteger)index {
    NSLog(@"Tag "%@" was tapped", tagsControl.tags[index]);
    if (!_selectedTagView.tags containsObject:tagsControl.tags[index]]) {
    [_selectedTagView.tags insertObject:tagsControl.tags[index] atIndex:0];
    [_selectedTagView reloadTagSubviews];
    } else {
    [_selectedTagView.tags removeObject:tagsControl.tags[index]];
    [_selectedTagView reloadTagSubviews];
    }
    }
  1. Your selected tags array is the _viewNewTags.tags array.
  • You can add an NSLog(@"Selected Tags %@", _selectedTagView.tags); to the tagsControl method and it will show the _selectedTagView.tags array whenever user selects a pre-defined tag, however I can't figure out how to log the _selectedTagView.tags array when user adds or deletes an object.

Wrap tags

Could be perfect library, if there was option to wrap tag list, so it could be multiple lines

RTL Support

Dears,

Can you support start tag from right to left ?

Regards

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.