Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

Make selectNextField public, and hook up the keyboard Next button. #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions BSKeyboardControls/BSKeyboardControls.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ typedef NS_ENUM(NSUInteger, BSKeyboardControlsDirection)
*/
- (id)initWithFields:(NSArray *)fields;

/**
Makes the next field the first responder.
*/
- (void)selectNextField;

@end

@protocol BSKeyboardControlsDelegate <NSObject>
Expand Down
6 changes: 6 additions & 0 deletions Example/Example/ViewController.m
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ - (void)textFieldDidBeginEditing:(UITextField *)textField
[self.keyboardControls setActiveField:textField];
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[self.keyboardControls selectNextField];
return YES;
}

#pragma mark -
#pragma mark Text View Delegate

Expand Down
Loading