Im Trying to make an app with Xcode and I want to add tabs that can be opened with Table View The problem I cant link the codes with the table is there a way to programatically make a tab change when a different button is pressed on a table
thats what I'm unto
is there a way i can add something to the codes to open tabs when buttons are pressed.
i attached an example code is there a way to edit it to change tabs with the table view
thats what I'm unto
Code:
[COLOR="Red"]AppDelegate.h [/COLOR]
#import <Cocoa/Cocoa.h>
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *Window;
@property (weak) IBOutlet NSArrayController *arrayController;
[COLOR="Blue"]AppDelegate.m[/COLOR]
#import "AppDelegate.h"
@implementation AppDelegate
@synthesize Window = _window;
@synthesize arrayController = _arrayController;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[_arrayController addObject: [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Tab1", @"name",
nil
]
];
[_arrayController addObject: [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Tab2", @"name",
nil
]
];
[_arrayController addObject: [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Tab3", @"name",
nil
]
];
}
i attached an example code is there a way to edit it to change tabs with the table view
Attachments
Last edited: