Skip to content

Commit

Permalink
add isFirstResponder
Browse files Browse the repository at this point in the history
  • Loading branch information
zonghongyan committed Oct 23, 2017
1 parent 42b781b commit 478257c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions EVNCustomSearchBar/EVNCustomSearchBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ typedef NS_ENUM(NSUInteger, EVNCustomSearchBarIconAlign)

@property (nonatomic, strong) UIView *inputView;

- (BOOL)isFirstResponder;
- (BOOL)resignFirstResponder;
- (BOOL)becomeFirstResponder;

Expand Down
5 changes: 5 additions & 0 deletions EVNCustomSearchBar/EVNCustomSearchBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ - (void)setPlaceholderColor:(UIColor *)placeholderColor
}
}

- (BOOL)isFirstResponder
{
return [_textField isFirstResponder];
}

- (BOOL)resignFirstResponder
{
return [_textField resignFirstResponder];
Expand Down

0 comments on commit 478257c

Please sign in to comment.