-
Notifications
You must be signed in to change notification settings - Fork 13
/
SMTagFieldDelegate.h
45 lines (34 loc) · 1.06 KB
/
SMTagFieldDelegate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// SMTagFieldDelegate.h
//
// Created by Shai Mishali on 6/16/13.
// Copyright (c) 2013 Shai Mishali. All rights reserved.
//
#import <Foundation/Foundation.h>
@class SMTagField;
@protocol SMTagFieldDelegate <NSObject>
@optional
/**
Called by delegate when a specific tag was added
@param tagField The Tag Field
@param tag The tag
*/
-(void) tagField: (SMTagField *) tagField tagAdded: (NSString *) tag;
/**
Called by delegate when a specific tag was removed
@param tagField The Tag Field
@param tag The tag
*/
-(void) tagField: (SMTagField *) tagField tagRemoved: (NSString *) tag;
/**
Called by delegate when any change to the tags occured (add/remove)
@param tagField The Tag Field
@param tag The tag
*/
-(void) tagField: (SMTagField *) tagField tagsChanged: (NSArray *) tags;
/**
Tells SMTagField whether or not it should add a new tag. This could be used to limit the number of tags or blacklist bad words, etc...
Defaults to YES if protocol isn't implemented.
*/
-(BOOL) tagField: (SMTagField *) tagField shouldAddTag: (NSString *) tag;
@end