0

i have been developing a custom keyboard with extensions. i would like to change the height of the keyboard when the device rotates. Currently am not using sizes classes just the autolayout constraints. Thanks in advance

1 Answers1

0

When you rotate your device for example portrait to landscape right and Landscap right to portrait.

-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
    if (fromInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
    {
        // change you height constraints here when landscap;
    }
    else if (fromInterfaceOrientation == UIInterfaceOrientationMaskPortrait)
    {
        // change you height constraints here when portrait;
    }
}
Jaimish
  • 629
  • 5
  • 15