Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 20, 2013, 03:53 PM   #1
cpuin
macrumors member
 
Join Date: Feb 2013
ToolBar to change pannels

I created a simple app with NSToolbar.
I've made 3 icons binded to a method which must change the content of the main window:

Code:
- (IBAction) setPanel:(id)sender
{
    if ([sender tag]==0)
    {
        //set new document pannel
    }
    else if ([sender tag]==1)
    {
        //set new documents pannel
    }
    else if ([sender tag]==2)
    {
        //set new settings pannel
    }
        
}
My question is how to change the current content of the window with one from another xib file?
cpuin is offline   0 Reply With Quote
Old Jun 20, 2013, 04:16 PM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
Put an NSTabView in your window. Give it one of the NSTabViewTypes that start with "NSNoTabs". Clicking a toolbar icon changes the tab index.


https://developer.apple.com/library/.../uid/10000074i
chown33 is offline   0 Reply With Quote
Old Jul 5, 2013, 07:35 AM   #3
cpuin
Thread Starter
macrumors member
 
Join Date: Feb 2013
Quote:
Originally Posted by chown33 View Post
Put an NSTabView in your window. Give it one of the NSTabViewTypes that start with "NSNoTabs". Clicking a toolbar icon changes the tab index.


https://developer.apple.com/library/.../uid/10000074i
Thanks a lot.Unfortunately i can't find how to make it using xib files for the different tabs.I don't know how to make NSView to init with XIB.
cpuin is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Tags
switch pane, toolbar

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:18 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC