Search code examples
iosobjective-cuitextviewiqkeyboardmanager

UITextVIew is not moving up while typing


I installed a pod file IQKeyboardManager in my project, but it is not working.

Here is screenshot, enter image description here

Image 1: This is my one of view for creating a ticket.

Subject and Message are text view, not text field.

When I start typing in Subject (subjectTextView) then I am not able to see what I'm typing & the same thing is happening in the message (messageTextView). I am not able to see content what I am typing in textview (see Image 2 A)

When I click on done then we can able see content (see image 2 B)

is there any solution? When I start typing in subjectTextView and messageTextview I want to move textview up while typing.

Update : I added following code in appdelegate file, still not working

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    [[IQKeyboardManager sharedManager] setEnable:YES];

    return YES;
}

Solution

  • Add below code in App Delegate didFinishLaunchingWithOptions method,'

    [[IQKeyboardManager sharedManager] setEnable:YES];
    

    or You can add in viewWillDisappear or viewDidLoad method in that class.

    You may be done one small mistake. Have you written anything in viewWillAppear or viewWillDisappear method?