How to move the buttons in a UIAlertView to make room for an inserted UITextField?

后端 未结 8 779
挽巷
挽巷 2020-12-24 00:07

[EDIT] Hmm. Perhaps this question should be titled \"what is the default user-input dialog view called in CocoaTouch?\" I realize that I can create an entire view that is

8条回答
  •  忘掉有多难
    2020-12-24 00:34

    This simpler method works for me:

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"UIAlertView"
        message:@"" delegate:self cancelButtonTitle:@"OK"
        otherButtonTitles:nil];
    [alert addTextFieldWithValue:@"" label:@"Text Field"];
    

    Hope that helps. Oh if you needed multiple button rows then it's:

    [alert setNumberOfRows:3];
    

    Cheers

提交回复
热议问题