我的应用程序中有一个UIWebView,它可以执行UIMenuController。我会在UIMenuController中添加一个自定义的UIMenuItem (比如"google it")。我添加UIMenuItem的代码是:
UIMenuItem *searchItem = [[UIMenuItem alloc] initWithTitle:@"google it" action:@selector(searchWithSelectedText)];
[[UIMenuController sharedMenuController] setMenuItems:[NSArray arrayWithObject:searchItem]];
[searchItem release];现在,可以显示自定义UIMenuItem并在单击后执行正确的操作。但在ios5中,UIMenuItem显示时太宽了。
是否可以像系统项一样将自定义UIMenuItem设置得更短?
谢谢。
发布于 2012-07-05 15:38:59
这是新的系统风格,我不认为你可以定制它。
https://stackoverflow.com/questions/8651950
复制相似问题