Skip to content

Instantly share code, notes, and snippets.

@tolmasky
Created January 15, 2010 11:06
Show Gist options
  • Save tolmasky/277964 to your computer and use it in GitHub Desktop.
Save tolmasky/277964 to your computer and use it in GitHub Desktop.
- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
{
if (itemIdentifier == @"cheese")
{NSLog(@"asking for it");
if (!item)
{
item = [[X alloc] initWithItemIdentifier:itemIdentifier];
[item setLabel:@"HELLO THERE"];
[item setPaletteLabel:@"HELLO THERE"];
NSLog(@"%@", item);
}
return item;
}
return nil;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment