请选择 进入手机版 | 继续访问电脑版
帖子
帖子
用户
博客
课程
12下一页
返回列表 发新帖
显示全部楼层
5
帖子
0
勋章
20
Y币

[superwebview] iOS APPdelegate初始化apicloud 无法强制竖屏

[复制链接]
发表于 2018-10-11 17:32:23
- (BOOL)applicationUIApplication *)application didFinishLaunchingWithOptionsNSDictionary *)launchOptions {
    // Override point for customization after application launch.
     [[APIManager sharedManager] initSDKWithLaunchOptions:launchOptions];

在写强制竖屏的代码 就不管用了 xcode里设置也不管用   怎么解决呢

28
帖子
1
勋章
1万+
Y币
在window的rootViewController里面实现- (UIInterfaceOrientationMask)supportedInterfaceOrientations方法,返回UIInterfaceOrientationMaskPortrait
5
帖子
0
勋章
20
Y币
技术咨询-Kenny 发表于 2018-10-12 09:56
在window的rootViewController里面实现- (UIInterfaceOrientationMask)supportedInterfaceOrientations方法 ...

设置过 ,不行  那样只有界面不动 但是状态栏还是会动
5
帖子
0
勋章
20
Y币
banrongyang 发表于 2018-10-13 14:44
设置过 ,不行  那样只有界面不动 但是状态栏还是会动

APPdelegate  里设置  下边的也不行    到首页再通知设置也不行

#pragma mark - 控制屏幕旋转方法
- (BOOL)shouldAutorotate{
    return NO;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
    return UIInterfaceOrientationMaskPortrait;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
    return UIInterfaceOrientationPortrait;
}

#pragma mark - 强制竖屏
//- (UIInterfaceOrientationMask)applicationUIApplication *)application supportedInterfaceOrientationsForWindowUIWindow *)window {
//    return UIInterfaceOrientationMaskPortrait;
//}
- (UIInterfaceOrientationMask)applicationUIApplication *)application supportedInterfaceOrientationsForWindowUIWindow *)window{
    if(_enablePortrait){
        BRYLog(@"输输输11111");
        return UIInterfaceOrientationMaskPortrait;
    }
    BRYLog(@"输输输22222");
    return UIInterfaceOrientationMaskPortrait;
   
}
28
帖子
1
勋章
1万+
Y币
banrongyang 发表于 2018-10-13 14:45
APPdelegate  里设置  下边的也不行    到首页再通知设置也不行

#pragma mark - 控制屏幕旋转方法

shouldAutorotate要返回YES
5
帖子
0
勋章
20
Y币

我是要屏幕强制竖屏  不让横屏的
5
帖子
0
勋章
20
Y币
banrongyang 发表于 2018-10-15 09:51
我是要屏幕强制竖屏  不让横屏的

ret  yes;也不好使  
28
帖子
1
勋章
1万+
Y币
banrongyang 发表于 2018-10-15 09:51
我是要屏幕强制竖屏  不让横屏的

你看看demo吧,默认就是强制竖屏
5
帖子
0
勋章
20
Y币
本帖最后由 banrongyang 于 2018-10-15 11:14 编辑

我新建项目  也是会横屏,什么都代码都没有    xcode里的屏幕方向只剩下竖屏的了,还是横屏,,,我的意思是  手机横行的时候  也不让APP内容横置  还是保持树屏状态
28
帖子
1
勋章
1万+
Y币
banrongyang 发表于 2018-10-15 11:13
我新建项目  也是会横屏,什么都代码都没有    xcode里的屏幕方向只剩下竖屏的了,还是横屏,,,我的意思 ...

你现在重新动态生成SDK,用新生成的库试试。
12下一页
您需要登录后才可以回帖 登录

本版积分规则