Skip to content

Instantly share code, notes, and snippets.

@RonchettiAssociati
Created January 19, 2010 09:01
Show Gist options
  • Save RonchettiAssociati/280789 to your computer and use it in GitHub Desktop.
Save RonchettiAssociati/280789 to your computer and use it in GitHub Desktop.
-(void)selectedItem:anItemView
{
var tag = [anItemView._toolbarItem tag];
var viewsBefore = [[myMenu _toolbarView] subviews];
var index = [viewsBefore indexOfObject:anItemView];
if ([selectableItemsArray containsObject:tag])
{
switch(tag)
{
case "Persone": [toolbarItem6 setView:segmentedControl1]; [toolbarItem6 setLabel:"Choose"]; break;
case "Organizzazioni": [toolbarItem6 setView:segmentedControl2]; [toolbarItem6 setLabel:"Choose"]; break;
default: [toolbarItem6 setView:nil]; [toolbarItem6 setLabel:""]; break;
}
[myMenu _reloadToolbarItems];
var viewsAfter = [[myMenu _toolbarView] subviews];
[viewsAfter[index] setBackgroundColor:colorBRoLightGray];
[viewsAfter[index]._labelField setTextColor:[CPColor whiteColor]];
}
[app02Controller menuSelection:tag];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment