What all does UITableViewController
get me that makes it actually useful? Is there any bonus is using it instead of just using a UIViewController
for views with UITableViews
in them? I ask because I want my views with UITableViews
to inherit from a base view controller (which inherits from UIViewController
). If I use a UITableViewController
then having a base class for all my views becomes more difficult.
They are separate classes: UIView is a class that represents the screen of the device of everything that is visible to the viewer, while UIViewController is a class that controls an instance of UIView, and handles all of the logic and code behind that view.
A view controller that specializes in managing a table view.
A table view is an instance of the UITableView class, which is a subclass of UIScrollView. Table view cells, which are the repeatable rows, or views, shown in the table view. A table view cell is an instance of a UITableViewCell class, and that class is often subclassed to create custom table view cells.
NavController manages app navigation within a NavHost . Apps will generally obtain a controller directly from a host, or by using one of the utility methods on the Navigation class rather than create a controller directly. Navigation flows and destinations are determined by the navigation graph owned by the controller.
Not much. It provides some conveniences, but you never really need it; I often don't use it.
The main things, aside from the automatic setup when you create one in the storyboard, are the three properties tableView
, clearsSelectionOnViewWillAppear
, and refreshControl
. But they don't do anything you can't do yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With