美文网首页
Ignoring Log问题

Ignoring Log问题

作者: CyrusCao | 来源:发表于2016-07-08 23:34 被阅读45次

No. 1

[UIWindow endDisablingInterfaceAutorotationAnimated:]
called on
without matching -beginDisablingInterfaceAutorotation.
Ignoring.

原理

当 scrollView 中的 textView 是第一响应者时,滚动 scrollView 会自动取代 textView 第一响应者的地位,从而把 textView 调用的 keypad 关掉。而由于textView 本身失去焦点时自身会关掉 keypad,所以这两个关掉 keypad 的动画会在同一时间被触发,因此被系统忽略掉了一个并且进行打印输出。

解决方法

为 scrollView 设置代理,实现 scrollViewDidScroll() 方法,监视 scrollView 的滚动行为。一旦滚动,则调用 textView 的 endEditing()方法来强行结束编辑。

相关文章

网友评论

      本文标题:Ignoring Log问题

      本文链接:https://www.haomeiwen.com/subject/uvyrjttx.html