UIActionSheet最后一個按鈕沒響應,一般是cancelButton,要稍微向上偏移一點才可以。
不過這不是常態,幾乎沒多少人碰到這個問題,這是在特定情況下才會發生,這個場景就是試用了UITabBar的時候才有。
參考:http://stackoverflow.com/questions/2096852/iphone-weird-bug-between-uiactionsheet-and-uitabbar
解決辦法:
UIActionSheet *action? =
[[UIActionSheet alloc] initWithTitle:@"您是否撥打"
delegate:self
cancelButtonTitle:@"取消撥打"
destructiveButtonTitle:@"撥打"
otherButtonTitles:@"加入電話本",nil];
//[action showInView:self.view];? 把這行更換為下面這個
[action showInView:[UIApplication sharedApplication].keyWindow];
[action release];
據聞是tabbar剛好在取消按鈕的地方,所以離奇了,不過UIActionSheet是在tabbar上方,很難想象會出現這個問題。
http://www.cnblogs.com/bucengyongyou/archive/2012/10/13/2722469.html