慕桂英3389331
anyobj 可能对应多个类 (UITextField UIView)那就先判断它是什么 再对应操作if ([anyobj isKinfOfClass:[UITextField Class]]) {//anyobj 如果是 UITextField 类UITextField *tmp = (UITextField*)anyobjtmp.text = "这里在赋值"} else if ([anyobj isKinfOfClass:[UIView Class]]) {//anyobj 如果是 UIView 类UIView *tmp = (UIView *)anyobjtmp.hidden = YES}