I am making a new app that has four sets of data that are very similar. I want to make four UIButtons to navigate to one UITabBar with four UITableViews. I don’t want to make four buttons that push to four sets of tableviews. I figure making an app with 13 UIViews would make it bigger than it needs to be. So, I have to figure out how to make the UIButton action change the data the tables receive. I am working on this project actively. Any suggestions would be helpful. Thank you.
Share
In order to change a table views data source you need to change what is returned from numberOfRowsInSection on your table delegate. One way I have done this is to use an enum to represent which set of data I want to use and have a local variable to save which one is selected
And then in cellForRowAtIndexPath