Skip to content

Instantly share code, notes, and snippets.

@meelash
Created July 28, 2010 21:46
Show Gist options
  • Select an option

  • Save meelash/496445 to your computer and use it in GitHub Desktop.

Select an option

Save meelash/496445 to your computer and use it in GitHub Desktop.
- (CPToolbarItem)toolbar:(CPToolbar)toolbar itemForItemIdentifier:(CPString)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
{
var toolbarItem = [[CPToolbarItem alloc] initWithItemIdentifier:itemIdentifier];
if (itemIdentifier === @"icon")
{
[toolbarItem setImage:[[CPImage alloc] initWithContentsOfFile:@"Resources/images/toolbarDetailedDebateIcon3.jpg" size:CGSizeMake(258.2,48)]];
[toolbarItem setLabel:@""];
[toolbarItem setMinSize:CGSizeMake(258.2,48)];
}
if (itemIdentifier === @"new")
{
[toolbarItem setImage: [[CPImage alloc] initWithContentsOfFile:@"Resources/images/toolbarNew-normal.jpg" size:CGSizeMake(51.7,48.0)]];
[toolbarItem setAlternateImage: [[CPImage alloc] initWithContentsOfFile:@"Resources/images/toolbarNew-mousedown.jpg" size:CGSizeMake(51.7,48.0)]];
[toolbarItem setLabel:@"New Debate"];
}
return toolbarItem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment