首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏学海无涯

    iOS开发之集成目标检测模型YOLOv8

    let exifOrientation: CGImagePropertyOrientation switch curDeviceOrientation { case UIDeviceOrientation.portraitUpsideDown : exifOrientation = .left case UIDeviceOrientation.landscapeLeft: exifOrientation = .upMirrored case UIDeviceOrientation.landscapeRight: exifOrientation = .down case UIDeviceOrientation.portrait: exifOrientation = .up default: exifOrientation

    1.3K11编辑于 2024-05-21
  • 来自专栏一“技”之长

    iOS获取和监测设备基本信息——UIDevice的使用

    . @"4.0" //获取设备方向 @property(nonatomic,readonly) UIDeviceOrientation orientation;        //获取设备UUID对象 float                         batteryLevel NS_AVAILABLE_IOS(3_0); 设备方向的枚举如下: typedef NS_ENUM(NSInteger, UIDeviceOrientation

    98120发布于 2018-08-15
  • 来自专栏sktj

    IOS 给相机添加滤镜效果

    67 68 let orientation = UIDevice.current().orientation 69 if orientation == UIDeviceOrientation.portraitUpsideDown ciImage.applying(CGAffineTransform(rotationAngle: CGFloat(M_PI / 2.0))) 71 } 72 else if orientation == UIDeviceOrientation.portrait ciImage.applying(CGAffineTransform(rotationAngle: CGFloat(M_PI / -2.0))) 74 } 75 else if (orientation == UIDeviceOrientation.landscapeRight

    1.3K10发布于 2019-07-10
  • 来自专栏梧雨北辰的开发录

    iOS屏幕旋转及其基本适配方法

    部分界面横屏 七、默认横屏无效的问题 八、关于旋转后的适配问题 九、APP启动即全屏 一、最让人纠结的三种枚举 刚开始接触屏幕旋转这块知识的时候,最让人抓狂的也许就是三种相关的枚举类型了,它们就是UIDeviceOrientation 设备方向:UIDeviceOrientation UIDeviceOrientation是硬件设备(iPhone、iPad等)本身的当前旋转方向,设备方向有7种(包括一种未知的情况),判断设备的方向是以 typedef NS_ENUM(NSInteger, UIDeviceOrientation) { UIDeviceOrientationUnknown, UIDeviceOrientationPortrait UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft } __TVOS_PROHIBITED; 区别与UIDeviceOrientation UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight), } __TVOS_PROHIBITED; 我们知道UIDeviceOrientation

    10.8K60发布于 2018-04-24
  • 来自专栏iOS 备忘录

    iOS 11.0 之后拍照生成的imageOrientation的问题

    orientation]; [self takeImageCompletion:tempImage buffer:nil error:error]; } } // 这个方法可以放在UIDeviceOrientation 的Category中统一定义 - (UIImageOrientation)getUIImageOrientationFromDevice { UIDeviceOrientation orientation

    2.5K31发布于 2021-04-15
  • 来自专栏落影的专栏

    iOS横竖屏切换

    基础概念 UIDeviceOrientation UIDeviceOrientation,表示设备朝向,可以通过[UIDevice currentDevice] orientation]获取,取值有: typedef NS_ENUM(NSInteger, UIDeviceOrientation) { UIDeviceOrientationUnknown, // 未知, // 屏幕朝下 } UIInterfaceOrientation UIInterfaceOrientation,表示页面内容朝向,注意UIInterfaceOrientation和UIDeviceOrientation

    3.5K20编辑于 2022-09-28
  • 来自专栏iOS开发~

    iOS_适配 iOS16 转屏

    返回 UIDeviceOrientationUnknown 解决:延迟回调 complete 后获取 Codes: NSString *MODeviceOrientationDescription(UIDeviceOrientation * _Nullable error); void MOGeometryUpdate(UIViewController *viewController, UIDeviceOrientation

    1.7K10编辑于 2023-10-18
  • 来自专栏全栈程序员必看

    layoutSubviews 调用

    具体代码: -(void)layoutSubviews{ [super layoutSubviews]; UIDeviceOrientation interfaceOrientation=[[ -(void)layoutSubviews{ [super layoutSubviews]; UIDeviceOrientation interfaceOrientation=[[UIApplication

    79350编辑于 2022-09-17
  • 来自专栏iOS开发~

    iOS_单元测试二之UITests

    self.app.keyboards // 等等 二、XCUIDevice XCUIDevice可以模拟iOS设备的物理按钮、设备方向和Siri交互的代理 let device = XCUIDevice.shared // UIDeviceOrientation 键在右侧 // landscapeRight: 设备水平方向,Home键在左侧 // faceUp: 面向设备平面,面朝上 // faceDown: 面向设备平面,面朝下 let orientation: UIDeviceOrientation

    1.2K20编辑于 2022-07-20
  • 来自专栏谈补锅

    iOS屏幕尺寸和分辨率了解

    . @"4.0" @property(nonatomic,readonly) UIDeviceOrientation orientation __TVOS_PROHIBITED; // return

    3.8K20发布于 2018-09-27
  • 来自专栏码客

    iOS常见问题

    - (void)viewWillLayoutSubviews{ [self _shouldRotateToOrientation:(UIDeviceOrientation)[UIApplication sharedApplication].statusBarOrientation]; } - (void)_shouldRotateToOrientation:(UIDeviceOrientation

    99730发布于 2019-10-22
  • 来自专栏mukekeheart的iOS之旅

    iOS学习——获取iOS设备的各种信息

    UIDeviceProximityStateDidChangeNotification NS_AVAILABLE_IOS(3_0); 其中,设备方向的枚举选项有以下几种: typedef NS_ENUM(NSInteger, UIDeviceOrientation

    4.2K71发布于 2018-03-01
  • 来自专栏全栈程序员必看

    ios学习7_iPhone屏幕尺寸、分辨率及适配[通俗易懂]

    property(nonatomic,readonly) CGRect bounds; ——————————————————————————– //考虑转屏的影响,按照实际屏幕方向(UIDeviceOrientation

    4.2K20编辑于 2022-08-27
  • 来自专栏Java架构师必看

    ios学习7_iPhone屏幕尺寸、分辨率及适配

    --------------------------------------------------------------------------- //考虑转屏的影响,按照实际屏幕方向(UIDeviceOrientation

    1.6K50编辑于 2022-04-24
  • 来自专栏全栈程序员必看

    iPhone屏幕尺寸、分辨率及适配

    property(nonatomic,readonly) CGRect bounds; ——————————————————————————– //考虑转屏的影响,按照实际屏幕方向(UIDeviceOrientation

    11.5K20编辑于 2022-07-23
  • 来自专栏mukekeheart的iOS之旅

    IOS开发之尺寸

    -------------------------------------------------------------------------------- //考虑转屏的影响,按照实际屏幕方向(UIDeviceOrientation

    3.7K40发布于 2018-12-14
领券