我一直在开发带扩展名的自定义键盘。我想在设备旋转时更改键盘的高度。目前我没有使用大小类只是自动布局约束。提前致谢
答案 0 :(得分:0)
当您将设备旋转为示例纵向为横向右侧并将Landscap旋转为纵向时。
-(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;
}
}