Skip to content

Instantly share code, notes, and snippets.

@Me1000
Created May 25, 2010 20:27
Show Gist options
  • Select an option

  • Save Me1000/413643 to your computer and use it in GitHub Desktop.

Select an option

Save Me1000/413643 to your computer and use it in GitHub Desktop.
newLocationType = [[CPPopUpButton alloc] initWithFrame:CGRectMake(105, 70, 200, 24)];
[newLocationType setBordered:NO];
[newLocationType setTitle:@"Select Type"];
// You can add items with just titles like so: (Note: it takes an array)
[newLocationType addItemsWithTitles:[@"Select Type", @"Building", @"Computer", @"Safe", @"Car", @"Bank", @"Yard"]];
// or pass your own menu items as an array
// This is useful if you want custom menu items (with images in them for example)
//[newLocationType addItems:[LocationItemTypes menuItems]];
[contentView addSubview:newLocationType];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment