for(UIView *view in subviews){ if(view.tag == 998) { //根据tag判断 }if([view isKindOfClass:[UIImageView class]]) { //根据类型判断 }}