0

UITextViewinputViewinputAccessoryView非常酷!

现在inputView,当用户请求时,我正在使用 替换键盘。文档说,在更改inputView或之后,inputAccessoryView我们必须调用-reloadInputViewswhich,根据文档,不会更改设置动画:

当当前对象为第一响应者时,您可以使用此方法刷新与当前对象关联的自定义输入视图或输入附件视图。视图会立即被替换——也就是说,不会将它们设置为动画。如果当前对象不是第一响应者,则此方法无效。

这意味着每当用户按下按钮来切换 时inputView,键盘就会消失,然后inputView出现,一切都会立即发生,由于缺少漂亮的动画,这看起来非常不符合 iOS7-y。

所以,我的问题是:是否可以inputView在切换时将其设置为动画(不诉诸 App Store 禁止操作)?

4

1 回答 1

0

You could do this by having your custom controls be in a sub view - then have the main view animate the sub view in.

I suspect the api limitation is there so that Apple don't have to try making a one-size-fits-all animation.

于 2014-05-11T11:24:16.597 回答