Reputation: 3616
I am working on setting a uivewcontroller with 4 buttons which when i click will change the view underneath to different view. It could be either uitableview or just regular uiview with some text. I saw an answer here that i liked but i can't find it anymore. There is a way to split the views into different files so it will be more organized. I am using storyboards should i just bring 4 views on top of each other and then hide 3 of them? Also i am thinking to have a separate file for each so i can set them in the main view controller.
Also as far delegation. Do i need to set uitableview this way?
@interface PeopleTableView : UITableView <UITableViewDelegate, UITableViewDataSource>
and then create a separate protocol so that the mainviewcontroller can send the data to the peopletableview
Thanks!
Upvotes: 1
Views: 500
Reputation: 677
yes exactly you can follow the general way to create you tableviews or so on , but in the cases like you there is a thing called tag
is used. i'm sure you know.
so let's say for the tableviews , when you are in the row count , or setting the titles , you can firstly check the tableview's tag to learn which one is the enabled one.
hope this helps..
Upvotes: 1