iOS 遍历控件

NSArray *subviews = [_bgImageView subviews];

    for (id objInput in subviews) {

        if ([objInput isKindOfClass:[UITextField class]]) {

            UITextField *theTextField = objInput;

            if ([objInput isFirstResponder]) {

                [theTextField resignFirstResponder];

            }

        }

    }

 

你可能感兴趣的:(ios)