Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How does a uitableview work in an app?


Asked by Valentin Abbott on Dec 13, 2021 FAQ



UITableView manages the basic appearance of the table, but your app provides the cells ( UITableViewCell objects) that display the actual content. The standard cell configurations display a simple combination of text and images, but you can define custom cells that display any content you want.
Thereof,
The UITableView, the actual class behind the Table View, is designed to be flexible to handle various types of data. You may display a list of countries or contact names. Or like this example, we’ll use the table view to present a list of recipes. So how do you tell UITableView the list of data to display?
One may also ask, Table View is one of the common UI elements in iOS apps. Most apps, in some ways, make use of Table View to display list of data. The best example is the built-in Phone app. Your contacts are displayed in a Table View. Another example is the Mail app.
Next,
UITableView is used to display data in a list and it also gives the developer a fair amount of control over how the data is presented and how the user can interact with it. And for people from other realms, it’s like RecyclerView of Android and FlatList of React Native.
In fact,
To be precise, table views and collection views are also scroll views. If you look at the documentation of the UITableView class, you will see that it descends from UIScrollView. It might look like table views are made only to manage repeating elements.