代码之家  ›  专栏  ›  技术社区  ›  Alon Amir

iOS4.0:UITextField出错的UIAlertView

  •  0
  • Alon Amir  · 技术社区  · 16 年前

    http://www.freeimagehosting.net/uploads/494c515b14.jpg

    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];
    

    正如你所看到的,事情搞砸了。 它只发生在我的项目升级到ios4.0的时候。

    1 回复  |  直到 7 年前
        1
  •  0
  •   Alon Amir    16 年前

    推荐文章