1 nextResponder 響應(yīng)鏈的下個(gè)響應(yīng)者 上官網(wǎng)文檔吧
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 是不是當(dāng)前接收事件的View(textField textView)
3 becomeFirstResponder 通過(guò)判斷view.window 判斷是否可以執(zhí)行吃方法夭拌。
4 canResignFirstResponder
Simulator Screen Shot 2017年5月11日 下午2.59.37.png
在綠色外面黃色里面touch鏈斷了 手動(dòng)接上可以讓出來(lái)的黃色也能響應(yīng)點(diǎn)擊事件了不翩。