你如何控制动作表动画方向 [英] How do you control action sheet animation direction

查看:103
本文介绍了你如何控制动作表动画方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如Apple开发人员文档中所述 showFromTabBar ,它说:

As noted in the Apple developer docs for showFromTabBar, it says:


动画的风格取决于工具栏的样式,而不是接收器。

The style of the animation depends on the style of the toolbar, not the receiver.

当我使用此方法而不是时showInView 方法,它从上面滑入,而不是从下面滑入。

When I use this method as opposed to the showInView method, it slides in from above, not from below.

我正在使用 showFromTabBar 因为如果我不这样做,取消按钮部分是不可触摸的,因为它后面的标签栏有一些功能(pfft)。

I am using showFromTabBar because if I don't, the cancel button is partially untouchable due to some funkiness with the tab bar, which is behind it(pfft).

问题:如何使动作表从底部动画,就像通常使用 showInView

Question: how do you make the action sheet animate in from the bottom, as it would normally with showInView?

注意:我的标签栏妨碍了我的问题已经解决了将整个窗口作为 UIView 通过 showInView 传递如下:

Note: my problem with the tab bar getting in the way has been solved by passing the entire window as the UIView via showInView as follows:

[filterActionSheet showInView:[self.view window]];

解决UIActionSheet取消按钮问题

推荐答案

我遇到了同样的问题使用取消按钮。这是因为底栏隐藏触摸到达动作表。您可以简单地禁用该视图上的用户交互,直到操作表被取消,然后重新启用它。

I had the same problem with the cancel button. It is because the bottom bar "hides" the touches from getting through to the action sheet. You can simple disable user interaction on that view until the action sheet is dismissed and then reenable it.

这篇关于你如何控制动作表动画方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆