Find View that is the firstresponder
问题 I would like to get the view that is the first responder, currently I have a UITableView that contains UITextFields, using a method: -(UIView*) findFirstResponder { } I would like to be able to get the view that is the firstResponder and then do something with that view. Any ideas? 回答1: All I had to do was @implementation UIView (FindViewThatIsFirstResponder) - (UIView *)findViewThatIsFirstResponder { if (self.isFirstResponder) { return self; } for (UIView *subView in self.subviews) { UIView