Skip to main content

Posts

Showing posts from March, 2013

UITableView basic tutorial

In this tutorial we will create a table view with some dummy data, we will use disclosure indicator, change background color of cell, handle user selection, change separator color etc. There many tutorials which provides in depth information on UITableViews thus I will not touched that and instead targeted the practical How Tos. Create a new single view project and add a UITableView to the initial view controller which has been added to the storyboard automatically. In order to use UITableView in your viewcontroller you need to adapt to UITableViewDataSource and UITableViewDelegate.  UITableViewDelegate provides us with methods which let us handle user selection events, define row height, modifying view and much more. UITableViewDataSource provides data to UITableView to construct the view (to render content). Create table view cells, define the number of sections, number of rows in sections and much more. Adapt to required protocols @interface AYVie