UIActionSheet最后一项失去点击效果的解决方法

UIActionSheet最后一项失去点击效果的解决办法

在开发过程中,发现有时候UIActionSheet的最后一项点击失效,点最后一项的上半区域时有效,这是在特定情况下才会发生,这个场景是试用了UITabBar的时候才有。解决方法:

在showView时这样使用,

 [imageActionSheet showInView:[UIApplication sharedApplication].keyWindow];

[imageActionSheet showInView:self.view.window];

[imageActionSheet showInView:[AppDelegate sharedDelegate].tabBarController.view];

这样就不会发生遮挡现象了。