UIImageView *person = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"geren"]];
person.frame = CGRectMake(10, 10, 300, 130);
UITextField *newPwd = [[UITextField alloc] initWithFrame:CGRectMake(95, 55, 185, 21)];
newPwd.borderStyle = UITextBorderStyleRoundedRect;
newPwd.autocorrectionType = UITextAutocorrectionTypeYes;
newPwd.placeholder = @"输入您的新密码";
newPwd.secureTextEntry = YES;
newPwd.returnKeyType = UIReturnKeyDone;
newPwd.clearButtonMode = UITextFieldViewModeWhileEditing;
[newPwd setBackgroundColor:[UIColor whiteColor]];
[person addSubview:newPwd];
VIEW默认是不和用户交互的,所以要开启交互.userActivityEnable = YES
顶。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
person.userActivityEnable = YES;
UIImageView的用户交互是关的 ,必须要开启才好用
UIImageView的用户交互是关的 ,必须要开启才好用