美文网首页
UIResponder

UIResponder

作者: 事件_666 | 来源:发表于2017-05-01 11:09 被阅读0次

    1 nextResponder 响应链的下个响应者 上官网文档吧

    class does not store or set the next responder automatically, so this method returns nil
    by default. Subclasses must override this method and return an appropriate next responder. For example, UIView
    implements this method and returns the [UIViewController
    ]or its superview (if it doesn’t). [UIViewController
    ] similarly implements the method and returns its view’s superview. UIWindow
    returns the application object. UIApplication
    returns nil。
    2 isFirstResponder 是不是当前接收事件的View(textField textView)
    3 becomeFirstResponder 通过判断view.window 判断是否可以执行吃方法。
    4 canResignFirstResponder

    Simulator Screen Shot 2017年5月11日 下午2.59.37.png

    在绿色外面黄色里面touch链断了 手动接上可以让出来的黄色也能响应点击事件了。

    相关文章

      网友评论

          本文标题:UIResponder

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