Search code examples
iosvisual-studioxamarin.iosadjustpan

AdjustPan analog in IOS and get/lost focus for UITextField


I use VS with Xamarin (not Xamarin.Forms). Right now it looks like

AdjustPan

Is there anything like Android AdjustPan in IOs.

And second question - how to get/lost focus of UITextField programmatically?


Solution

  • Is there anything like Android AdjustPan in IOs.

    You can use third-party tool to manage your keyboard position.

    For example : IQKeyboardManager , you could add it via NuGet here.

    And second question - how to get/lost focus of UITextField programmatically?

    Get focus:

    textfield.BecomeFirstResponder();
    

    Lost focus:

    textfield.ResignFirstResponder();