Created
July 14, 2010 18:59
-
-
Save jeena/475862 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)openMoreAfterDelay:(id)sender { | |
UIMenuController *menuController = [UIMenuController sharedMenuController]; | |
[self becomeFirstResponder]; | |
NSMutableArray *menuItems = [[NSMutableArray alloc] initWithCapacity:5]; | |
UIMenuItem *item; | |
NSInteger i = 0; | |
for (SquaceMLAction *action in [[dataSource.squaceML.squaregrid.squares objectAtIndex:activeIndex] actions]) { | |
item = [[UIMenuItem alloc] initWithTitle:action.text action:NSSelectorFromString([NSString stringWithFormat:@"action%i:", i++])]; | |
[menuItems addObject:item]; | |
[item release]; | |
} | |
menuController.menuItems = menuItems; | |
[menuItems release]; | |
[menuController update]; | |
[menuController setMenuVisible:YES animated:YES]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment