相关疑难解决方法(0)

UIActionSheet取消按钮奇怪的行为

我有一个UIBarButtonItem打开一个动作表,为用户提供有关做什么的选择.除非我尝试点击"取消"按钮,否则一切都按预期工作.按钮的目标似乎已从应该的位置向上移动.我只能通过单击"取消"和"确定"按钮中间的某个位置来激活它.

我已经尝试过在其他应用程序中的动作表,它们工作正常,所以它不仅仅是我的大拇指.操作表在UIViewController中打开

- (void)showOpenOptions
{
    UIActionSheet *sheet = [[UIActionSheet alloc] 
    initWithTitle:NSLocalizedString(@"Open link in external application?", @"Open in external application")
    delegate:self
    cancelButtonTitle:NSLocalizedString(@"Cancel", @"Cancel")
    destructiveButtonTitle:NSLocalizedString(@"Open Link", @"Open Link")
    otherButtonTitles:nil];

    [sheet showInView:self.view];
    [sheet release];
}
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch objective-c uiactionsheet ios

116
推荐指数
5
解决办法
2万
查看次数

标签 统计

cocoa-touch ×1

ios ×1

iphone ×1

objective-c ×1

uiactionsheet ×1