我的游戏有问题,它是在 Xcode 中开发的。iOS 7 发布时,我看不到用于输入的文本框,但其他一切正常。而且我不知道如何解决它:( 。http: //i.stack.imgur.com/je6Kw.png http://i.stack.imgur.com/JIvLR.png
问题看起来有些相似:)。
这是我的代码,确定按钮也不起作用。
-(void)showRegisterAlert:(PlayerInfo*) play
{
NSString * pMessage = [NSString stringWithFormat:@"%@%d%@", @" Your Score is ", play->nScore, @"\n Enter Your Name\n\n"];
CGRect rect = CGRectMake(50, 75, 180, 20);
// CGRect rect = CGRectMake(50, 50, 180, 43);
m_pNameText = [[UITextField alloc] initWithFrame:rect];
m_pNewScoreAlert = [[UIAlertView alloc]initWithTitle:@"NEW HIGHSCORE" message:pMessage delegate:self
cancelButtonTitle:@"OK" otherButtonTitles:nil];
UIColor * color = [[UIColor alloc] initWithWhite:256.0f alpha:100.0f];
[m_pNameText setBackgroundColor: color];
[m_pNameText becomeFirstResponder];
[m_pNewScoreAlert addSubview:m_pNameText];
m_newPlay.nScore = play->nScore;
[m_pNewScoreAlert show];
[color release];
[m_pNewScoreAlert release];
SavePlayInfo();
}