이름을 묻는 간단한 대화 상자를 구현하고 있습니다. 이것은 내 코드입니다 :입력 대화 상자의 UITextField가 표시되지 않습니다.
UIAlertView* dialog = [[UIAlertView alloc] init];
[dialog setDelegate:self];
[dialog setTitle:@"Enter Name"];
[dialog setMessage:@" "];
[dialog addButtonWithTitle:@"Cancel"];
[dialog addButtonWithTitle:@"OK"];
UITextField *nameField = [[UITextField alloc] initWithFrame:CGRectMake(20.0, 45.0, 245.0, 25.0)];
[nameField setBackgroundColor:[UIColor whiteColor]];
[dialog addSubview:nameField];
CGAffineTransform moveUp = CGAffineTransformMakeTranslation(0.0, 20.0);
[dialog setTransform: moveUp];
[dialog show];
[dialog release];
[nameField release];
잘 작동했지만 iOS 7에서는 텍스트 필드가 표시되지 않습니다. 누구든지 도와 줄 수 있습니까?
감사합니다, 그건 좋은 작품 – Booms