From 6cce93b4431a026f7bb1f912591f8620539ccdaa Mon Sep 17 00:00:00 2001 From: Anthony Marchenko Date: Thu, 9 Jun 2016 23:44:31 +0300 Subject: [PATCH] add TLTagsControllDeleteOnly mode (add without possibility to add via control) --- TLTagsContol/TLTagsControl.h | 1 + TLTagsContol/TLTagsControl.m | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/TLTagsContol/TLTagsControl.h b/TLTagsContol/TLTagsControl.h index 7356d21..b9ed51a 100644 --- a/TLTagsContol/TLTagsControl.h +++ b/TLTagsContol/TLTagsControl.h @@ -18,6 +18,7 @@ typedef NS_ENUM(NSUInteger, TLTagsControlMode) { TLTagsControlModeEdit, + TLTagsControlDeleteOnly, TLTagsControlModeList, }; diff --git a/TLTagsContol/TLTagsControl.m b/TLTagsContol/TLTagsControl.m index 7f86a30..6f90b87 100644 --- a/TLTagsContol/TLTagsControl.m +++ b/TLTagsContol/TLTagsControl.m @@ -85,6 +85,11 @@ - (void)commonInit { if (_mode == TLTagsControlModeEdit) { [self addSubview:tagInputField_]; } + + if(_mode == TLTagsControlDeleteOnly) { + [self addSubview:tagInputField_]; + tagInputField_.userInteractionEnabled = NO; + } } #pragma mark - layout stuff