TKTableViewController Class Reference
Inherits from | UIViewController |
Declared in | TKTableViewController.h TKTableViewController.m |
Overview
This class provides basic UITableViewController
functionality under the TKViewController
class.
The key differences between TKTableViewController
and UITableViewController
:
– The UITableView
is a subview of the base view.
– The content offset of the UITableView
is remembered if the view is ever deconstructed by a memory warning.
– Built to easily allocate and handle an empty view and search functionality.
Tasks
Other Methods
Properties
-
tableView
property -
style
property -
searchBar
property -
searchBarDisplayController
property -
clearsSelectionOnViewWillAppear
property
Properties
clearsSelectionOnViewWillAppear
The default value of this property is YES. When YES, the table view controller clears the table’s current selection when it receives a viewWillAppear: message. Setting this property to NO preserves the selection.
@property (nonatomic, assign) BOOL clearsSelectionOnViewWillAppear
Declared In
TKTableViewController.h
searchBar
Returns a UISearchBar
view.
@property (nonatomic, strong) UISearchBar *searchBar
Declared In
TKTableViewController.h
searchBarDisplayController
Returns a UISearchDisplayController
for the search bar and table view.
@property (nonatomic, strong) UISearchDisplayController *searchBarDisplayController
Declared In
TKTableViewController.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
orUITableViewStyleGrouped
).
Return Value
An initialized TKTableViewController
object or nil if the object couldn’t be created.
Declared In
TKTableViewController.h