i am trying to develop mac application(cocoa app).i have successfully used tabbar in iphone app. but in developing mac application ,how to use tabbar?
As we use tabbar for iphone application,i want to implement same kind of functionality for Mac App(cocoa app).
any idea?how its possible?
I presume you are talking about an NSTabView when you refer to "tabbar" or "Tababr"...
You do not need to write your whole app in one AppDelegate.
You can add your AppDelegate as a delegate of your NSTabView and then implement
tabView:didSelectTabViewItem:
. This allows you to intercept requests by the user for different tabs. Just create an outlet for your tab view and set the delegate:Based on the requested tab you can then create the view controller associated with that tab and load the NSView into the selected tab. Something like:
I'm not sure whether you need to add NSTabViewDelegate as a protocol to your AppDelegate but if Xcode flags a warning you'll notice:
Hope this helps. Otherwise you need to elaborate on your requirements.