Search code examples
iosswiftuitableviewuicontainerviewiqkeyboardmanager

IQKeyboardManager not working when UITableView embedded in a container view


Currently, I am working with a container view with an embedded UITableView and am using the IQKeyboardManager CocoaPod to scroll the view so my UITextFields and UITextViews are not covered by the keyboard.

I can successfully import IQkeyboardManager and make it work in other views but it's not working when the UITableView is embedded in a container view.


Solution

  •     -(void)viewWillAppear:(BOOL)animated {
        [super viewWillAppear:YES]; // This line is needed for the 'auto slide up'
       // Do other stuff
    }
    

    Simple solution , No need to create observer.