UIActionSheet 取消按钮不可点击解决方法

1         UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"拍照" otherButtonTitles:@"选择照片", nil];
2         
3 //        [sheet showInView:self.view]; 把这个换为以下即可(tabbar刚好在取消按钮的地方,不过UIActionSheet是在tabbar上方,估计冲突...)
4         [sheet showInView:[UIApplication sharedApplication].keyWindow];

 特别提醒: 用[sheet showInView:[UIApplication sharedApplication].keyWindow];在横屏的时候会出现UIAtionSheet为竖屏,

         解决办法:就是把它加到tabbar上.解决了横竖屏以及取消无法点击的情况

             [myActionSheet showInView:self.tabBarController.tabBar]; OK了!!!!!

 

       

posted on 2014-08-29 08:34  键盘上的武者  阅读(345)  评论(0编辑  收藏  举报

导航