Inherits from TKTableViewController : UIViewController
Conforms to UITextFieldDelegate
UITextViewDelegate
Declared in TKKeyboardTableViewController.h
TKKeyboardTableViewController.m

Overview

This class provides additional functionality to TKTableViewController text entry. It will adjust its bounds when keyboards appear and hide keyboards when the user scrolls the table. When you subclass, make sure to set this view controller to the delegate of your UITextField and UITextView objects.

Properties

hideKeyboardOnScroll

This flag is set to YES, it will call resignResponders when the user scrolls a table view. On iPad defaults to NO, Phone defaults to YES.

@property (nonatomic, assign) BOOL hideKeyboardOnScroll

Declared In

TKKeyboardTableViewController.h

scrollToTextField

This flag is set to YES, it will scroll the UITextField or UITextView into the bounds when it becomes the first responder. Defaults to YES.

@property (nonatomic, assign) BOOL scrollToTextField

Declared In

TKKeyboardTableViewController.h

Instance Methods

initWithStyle:

Initializes a table-view controller to manage a table view of a given style.

- (instancetype)initWithStyle:(UITableViewStyle)style

Parameters

style

A constant that specifies the style of table view that the controller object is to manage (UITableViewStylePlain or UITableViewStyleGrouped).

Return Value

An initialized TKTableViewController object or nil if the object couldn’t be created.

Declared In

TKTableViewController.h

keyboardWillAppear:

Will adjust table view scroll bounds when a keyboard is popped up.

- (void)keyboardWillAppear:(NSNotification *)sender

Parameters

sender

The notification that sent the event.

Declared In

TKKeyboardTableViewController.h

keyboardWillDisappear:

Will reset the scrolling bound when the keyboard is dismissed.

- (void)keyboardWillDisappear:(NSNotification *)sender

Parameters

sender

The notification that sent the event.

Declared In

TKKeyboardTableViewController.h

resignResponders

When subclassing, call resignFirstResponder on all your UITextField and UITextView objects

- (void)resignResponders

Declared In

TKKeyboardTableViewController.h

scrollToView:

Scrolls the tableview to keep the view within the table view bounds.

- (void)scrollToView:(UIView *)view

Parameters

view

The view that the table views bounds adjusts to.

Declared In

TKKeyboardTableViewController.h