Я использую UIAlertView с тремя кнопками: «Dismiss», «Submit Score» и «View Leaderboard». UIAlertView также содержит имя пользователя UITextField. В настоящее время UITextField «имя пользователя» охватывает одну из кнопок в UIAlertView. Я просто хотел знать, как я могу остановить UITextField от покрытия одной из кнопок, т. Е. Переместите кнопки вниз.TextField Covering Кнопка UIAlertView
Вот изображение того, что происходит:
screenshot http://img684.imageshack.us/img684/3055/screenshot20110108at191.png
И вот мой код:
[username setBackgroundColor:[UIColor whiteColor]];
[username setBorderStyle:UITextBorderStyleRoundRect];
username.backgroundColor = [UIColor clearColor];
username.returnKeyType = UIReturnKeyDone;
username.keyboardAppearance = UIKeyboardAppearanceAlert;
username.placeholder = @"Enter your name here";
username = [[UITextField alloc] initWithFrame:CGRectMake(20.0, 45.0, 245.0, 25.0)];
username.borderStyle = UITextBorderStyleRoundedRect;
[username resignFirstResponder];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Congratulations"
message:[NSString stringWithFormat:@"You tapped %i times in %i seconds!\n", tapAmount, originalCountdownTime]
delegate:self
cancelButtonTitle:@"Dismiss"
otherButtonTitles:@"Submit To High Score Leaderboard", @"View Leaderboard", nil];
alert.tag = 01;
[alert addSubview:username];
[alert show];
[alert release];
Спасибо, по какой-то причине, что еще не исправил его? –
Вы также поменяли надпись 'CGRectMake'? Сделали свой «origin.y» ниже? – donkim