UIActionSheet最后一個(gè)按鈕沒響應(yīng)寄纵,一般是cancelButton立美,要稍微向上偏移一點(diǎn)才可以。
不過這不是常態(tài)隘竭,幾乎沒多少人碰到這個(gè)問題塘秦,這是在特定情況下才會(huì)發(fā)生,這個(gè)場(chǎng)景就是試用了UITabBar的時(shí)候才有动看。
參考: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];? 把這行更換為下面這個(gè)
[action showInView:[UIApplication sharedApplication].keyWindow];
[action release];
據(jù)聞是tabbar剛好在取消按鈕的地方尊剔,所以離奇了,不過UIActionSheet是在tabbar上方菱皆,很難想象會(huì)出現(xiàn)這個(gè)問題须误。
http://www.cnblogs.com/bucengyongyou/archive/2012/10/13/2722469.html