BLLandscape
BLLandscape copied to clipboard
横屏状态下,开启键盘为竖屏模式。
用一个 property 来标记当前的是否在输入,然后再 -supportedInterfaceOrientations 里返回横屏,键盘就能正确弹出了。
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
if (self.previewView.viewStatus == BLLandscapeViewStatusLandscape) {
return UIInterfaceOrientationMaskLandscapeRight;
}else {
return UIInterfaceOrientationMaskPortrait;
}
}
我试过这样子写,但是没有起作用。