【发布时间】:2019-08-01 15:09:05
【问题描述】:
这是我使用此代码时得到的:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"Rank on ScoreBoard: %d",positionOnBoard] message:@"" delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:@"Submit", nil];
nameField = [[UITextField alloc] initWithFrame:CGRectMake(12, 25, 260, 21)];
[nameField setBackgroundColor:[UIColor whiteColor]];
[nameField setPlaceholder:@"Your Name Here!"];
[alert addSubview:nameField];
[alert show];
[nameField becomeFirstResponder];
[alert release];
如您所见,它搞砸了。 仅在将我的项目升级到 iOS 4.0 时发生。
【问题讨论】:
标签: uitextfield ios4 uialertview