FYI – Noob iOS developer here.
My current setup is a UIViewController with a UIView within, then a UITableView within the UIVIew. So it goes like this…
UIViewController --> UIView --> UITableView
The reason for this is because I have other elements wrapped with the tableview. The UIViewController loads dynamic content into the table view. I have a segmented Control in which I want to use to switch the content within the table view.
I’ve read something on [table reload] and [table beginUpdate] but don’t understand how to use it. Any help would be great.
Ok, so
[table reloadData]will reload the data (so if you change the data and want to update the table with the necessary data call this), but straight after you call that make sure to call[table setNeedsDisplay]to refresh the UI.[table beginUpdates]begins a series of method calls that insert, delete, or select rows and sections of the receiver. You end the processes with
[table endUpdates];Make sure you set your table view’s
dataSourceanddelegateto self, this can be done through the xib and programmatically like this:or
As said:
Call this
delegatemethod forUISegmentedControl