我正在尝试创build一个自定义的UIMenuController并将其显示在我的视图中。 这是我的代码: UIMenuController *menuController = [UIMenuController sharedMenuController]; UIMenuItem *listMenuItem = [[UIMenuItem alloc] initWithTitle:@"List" action:@selector(addList:)]; [menuController setMenuItems:[NSArray arrayWithObject:listMenuItem]]; [menuController setTargetRect:CGRectMake(50.0, 50.0, 0, 0) inView:self.view]; [menuController setMenuVisible:YES animated:YES]; [listMenuItem release]; 没有错误或exception,但菜单控制器不显示。