What is the logically executed order of a UITableViewController's methods when a segue is performed to show the tableView? Here is my best guess:
viewWillLayoutSubviews
numberOfSectionsInTableView
numberOfRowsInSection
cellForRowAtIndexPath
heightForRowAtIndexPath
viewDidLoad
viewWillAppear
viewDidAppear
Please correct this ordering and add to it.
This may help you.
viewDidLoad
As it loads view first.
viewWillAppear
As any view appears again then this method is called.
numberOfSectionsInTableView
Sets number of sections in a table.
numberOfRowsInSection
After setting sections,this method determines number of rows in a section.
heightForRowAtIndexPath
Height for row will be set.
viewWillLayoutSubviews
View for section header is made.
cellForRowAtIndexPath
Contents and layout of cell of a tableview is created in this method.
viewDidAppear
If you have 1 row and 1 section. This is the pattern it goes through.
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