您的位置:首页 > 产品设计 > UI/UE

UIActionSheet cancel按钮不响应的问题

2012-05-27 12:05 239 查看
当APP中使用到tabbar,会出现部分按钮无法响应的问题。在xcode的控制台中也会报出相应的错误,提示使用从tabbar加载的信息。

解决方法如下:

UIActionSheet *removeActionSheet=[[UIActionSheet alloc]initWithTitle:titleforActionSheet delegate:selfcancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Ok" otherButtonTitles:nil, nil];

removeActionSheet.actionSheetStyle=UIActionSheetStyleDefault;
[removeActionSheet showInView:[UIApplication sharedApplication].keyWindow];

将原来showinView:self.view改为[[UIApplication sharedApplication].keyWindow]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: