0

I want to achieve effect like this below but also want distance between these two UITextFields. How can i do this?

UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"LoginAndPasswordStyle"
                                                               message:@"Enter login and password"
                                                        preferredStyle:UIAlertControllerStyleAlert];

[alert addTextFieldWithConfigurationHandler:^(UITextField *textField)
 {
     textField.placeholder = @"Login";
 }],
[alert addTextFieldWithConfigurationHandler:^(UITextField *textField)
 {
     textField.placeholder = @"Pass";
     textField.secureTextEntry = YES;
 }],

enter image description here

Hondus
  • 292
  • 1
  • 4
  • 16

2 Answers2

1

UIAlertController views are intended to be simple and not customizable. If you make your own presented view controller, then the view belongs to you and you can do anything you like. and for custom alert check this link , check more info to this link

Community
  • 1
  • 1
Shahzaib Maqbool
  • 1,479
  • 16
  • 25
1

maybe there is no official way to do this, but you can use some third party frameworks to custom you alert view, try this

Hondus
  • 292
  • 1
  • 4
  • 16
MudOnTire
  • 506
  • 3
  • 9