(UITextField *)findFirstResponder:(UIView *) view{
//遍历子视图
for(UIView *child in view.subviews){
if([child responesToSelector:@selector(isFirstResponder)] && [child isFirstResponder]){
return (UITextField *) child;
}
//子控件的第一响应者
UITextField *field = [self findFirstResponder: child];
if(field){
return field;
}
}
}