How to customize UIAlertView? Will Apple approve it?

后端 未结 8 1989
逝去的感伤
逝去的感伤 2021-02-04 18:48

I am using a custom UIAlertView with UITextField to get password from the user.

I have been told that this custom view may cause my App to get

8条回答
  •  无人及你
    2021-02-04 19:11

    I think there is a better way to solve this. Here is the code snippet

    UIAlertView *passwordAlert = [[UIAlertView alloc]                                       
                                  initWithTitle:@"Enter Password" message:@""
                                  delegate:self 
                                  cancelButtonTitle:nil                    
                                  otherButtonTitles:@"Submit", nil];
    
    passwordAlert.alertViewStyle = UIAlertViewStyleSecureTextInput;
    

    (You can find related implementations in prodeveloper blog)

    But this works fine on iOS 5.0 and above only. Please make a note of it. And Apple will certainly approve it.

提交回复
热议问题