目前我在 iPhone 应用程序中工作,使用 UIImageView 在屏幕上设置背景图像,然后在 UIImageView 中添加 UITextField,然后我运行应用程序,UITextField 无法启用,如何启用它?请帮我
提前致谢
我试过这个:
UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];
imageView.image=[UIImage imageNamed:@"2ndscreenback.png"];
Daystext =[[UITextField alloc]initWithFrame:CGRectMake(57, 122, 171, 31)];
Daystext.borderStyle=UITextBorderStyleRoundedRect;
Daystext.delegate=self;
Daystext.userInteractionEnabled=YES;
[imageView addSubview:Daystext];
[self.view addSubview:imageView];