Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alertView with textfield moves up twice(too much) when textfield become first responder and the keyboard shows #291

Closed
GeorgeSwift opened this issue Jul 11, 2020 · 2 comments

Comments

@GeorgeSwift
Copy link

Describe the bug
alertView with textfield moves up twice (too much) when textfield become first responder and keyboard shows and doesnt move back when keyboard disappears

To Reproduce
Steps to reproduce the behavior:

  1. add alert
    SCLAlertView *alert = [[SCLAlertView alloc] init];

     UITextField *textField = [alert addTextField:@""];
    
     [alert addButton:@"Confirm" actionBlock:^(void) {
         NSLog(@"Text value: %@", textField.text);
    
     }];
     //Overwrite SCLAlertView (Buttons, top circle and borders) colors
     alert.customViewColor = COLOR_LIGHTBLUEBACKGROUND;
    
     //Show animation type (Default is SCLAlertViewShowAnimationSlideInFromTop)
     alert.showAnimationType =  SCLAlertViewShowAnimationSlideInFromTop;
    
     [alert showEdit:weakSelf title:@"edit" subTitle:@"subtitle" closeButtonTitle:@"Cancel" duration:0.0f];
    
  2. Click on 'textfield' from second time

  3. Click on 'Confirm'

  4. See error

Expected behavior
alert moves up for a right distance once

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6s]
  • OS: [e.g. iOS13.4.1]
  • Version [e.g. 1.1.6]

Additional context
works well on first load , after first time , moves up twice

@GeorgeSwift
Copy link
Author

using IQKeyboardManager in the project

@GeorgeSwift
Copy link
Author

GeorgeSwift commented Jul 11, 2020

turning IQKeyboardManager off solves the "issue" .Thank you, this alertView is awesome!

@dogo dogo closed this as completed Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants