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
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;
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.