One Common View In Every ViewController

Posted by l3v on Stack Overflow See other posts from Stack Overflow or by l3v
Published on 2012-12-04T16:55:00Z Indexed on 2012/12/04 17:03 UTC
Read the original article Hit count: 132

Filed under:

I am having a hard time wording this when searching the internet so I am just going to ask the question.

I have an options view in my app that slides into view when the user clicks a button. This options view will display app information like settings. I want this options view to be displayed on every view controller in my app. I do not want to copy and paste the code for the options view into every viewcontroller file. The options view has quite a few outlets and actions and also calls many delegates.

How can I reuse this options view in all my view controllers without adding all the outlets, actions, and delegate methods each time?

I was going to make a new file with public methods, but I would still have to copy the outlets. Would this public methods file have to include delegate methods as well then?

Let me know if my question does not make sense. I am hoping there is a standard way of implementing something like this.

© Stack Overflow or respective owner

Related posts about ios