Reusing a Custom Toolbar in iOS

I created this nice custom toolbar that sits on one of my scenes, this scene uses its own viewcontroller. Prior to this I had no need to put it on any other viewcontroller, but after making modifications to my application I now need to put this toolbar on another viewcontroller/scene. I would prefer not to have to re-create the whole UI aspect of it again and connect up everything.

Ive created this toolbar on a scene using a storyboard. Is it possible somehow to reuse all the elements I've created for this toolbar (the code for all the logic already sits in its own class)? Or would I need to create the entire toolbar in the code for this to be possible? Is there any easier way that I just dont know about?

Answers


I think you have two options here. One would be to keep the custom toolbar view always on the screen, and change the views around it to whatever you like. Another option would be to create an instance of your toolbar from any class you need, then add it's view as a subview everytime you need it.

Either way, I think you may need to rework some the toolbar to not sit on a scene, but have it's own.


Need Your Help

Using Silverlight controls from an WP7 XNA project

silverlight windows-phone-7 xna

I have an XNA project on WP7. I would like to get access to the camera raw data using the PhotoCamera class. I guess the only way to get it is using a Silverlight control called VideoBrush. Is ther...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.