zoukankan      html  css  js  c++  java
  • 强制横屏

     说明:目前在ios7,ios8上验证有效,注意该UIViewController不能添加到UINavigationController,只能presentViewController方式添加。

     

    - (BOOL)shouldAutorotate
    {

        return NO;

    }

     

    - (NSUInteger)supportedInterfaceOrientations

    {

        // 强制横屏

        return UIInterfaceOrientationMaskLandscapeRight;

    }

     

    - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation

    {

        // 强制横屏

        return UIInterfaceOrientationLandscapeRight;

    }

  • 相关阅读:
    NIO学习
    XML(二)
    IO和NIO
    Log4j
    异常处理机制
    XML
    数据交互
    分页实现的三种方式
    Idea破解
    数据库连接池
  • 原文地址:https://www.cnblogs.com/ftrako/p/4347449.html
Copyright © 2011-2022 走看看