BLLandscape icon indicating copy to clipboard operation
BLLandscape copied to clipboard

横屏状态下,开启键盘为竖屏模式。

Open CXTretar opened this issue 7 years ago • 2 comments

CXTretar avatar May 08 '18 08:05 CXTretar

用一个 property 来标记当前的是否在输入,然后再 -supportedInterfaceOrientations 里返回横屏,键盘就能正确弹出了。

dito010 avatar May 08 '18 08:05 dito010

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    if (self.previewView.viewStatus == BLLandscapeViewStatusLandscape) {
        return UIInterfaceOrientationMaskLandscapeRight;
    }else {
        return UIInterfaceOrientationMaskPortrait;
    }
}

我试过这样子写,但是没有起作用。

CXTretar avatar May 08 '18 09:05 CXTretar