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!

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for reply. I was able to get it working with this question/answer stackoverflow.com/questions/3489238/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.