1

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!

Yan
  • 3,533
  • 4
  • 24
  • 45

1 Answers1

1

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..

iremk
  • 677
  • 1
  • 5
  • 16
  • Thanks for reply. I was able to get it working with this question/answer http://stackoverflow.com/questions/3489238/2-tableview-on-a-single-view/ – Yan May 01 '12 at 16:13