E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
uidevice
iOS开发日志 之 iOS10版本适配问题
1.系统判断方法失效在你的项目中,当需要判断系统版本的话,不要使用下面的方法:#defineisiOS10([[[[
UIDevice
currentDevice]systemVersion]substringToIndex
kidd风
·
2023-08-05 19:55
IOS开发日志
iOS10适配
Xcode8运行一堆log
iOS10隐私权限设置
iOS10适配https
isiPhoneX/刘海屏 相关的宏定义
主要是看isNotchScreen的判断方式1.根据每种设备的屏幕分辨率//判断是否是ipad#defineisPad([[
UIDevice
currentDevice]userInterfaceIdiom
知德
·
2023-07-29 08:54
ios13 获取wifi信息
iOS13获取Wi-Fi信息步骤首先开启定位权限定位.pngXcode开启WIFi权限image.pngimage.png手动请求定位权限NSString*phoneVersion=[[
UIDevice
currentDevice
当优秀成为习惯
·
2023-07-24 00:48
关于获取设备方向不准确的问题
我们平时在应用内获取设备方向一般有以下两种方式:1、UIInterfaceOrientationorientation=[UIApplicationsharedApplication].statusBarOrientation;2、
UIDevice
OrientationdeviceOrientation
懒惰的王子
·
2023-07-23 14:57
iOS 16 版本适配
2、隐私权限增强,如通过
UIDevice
获取设备名称时,无法获取用户的信息,只能获取设备对应的名称([
UIDevice
currentDevice].name返回iPhone,不再返回用户自定义的名字)3
ZhaiAlan
·
2023-07-19 09:56
ios
iOS版本适配
iOS_适配 iOS16 转屏
iOS_适配iOS16转屏问题1:iOS16屏幕旋转报错:[Orientation]BUGINCLIENTOFUIKIT:Setting
UIDevice
.orientationisnotsupported.PleaseuseUIWindowScene.requestGeometryUpdate
Morgana_Mo
·
2023-07-17 08:59
iOS开发
ios
cocoa
macos
objective-c
iOS屏幕旋转
1.屏幕旋转相关枚举关于屏幕旋转枚举一共有3种:UIInterfaceOrientation,UIInterfaceOrientationMask,
UIDevice
Orientation1.1UIInterfaceOrientation
super_man_风清扬
·
2023-07-15 00:44
iOS开发
cocoa
macos
objective-c
禁止某个控制器横屏
-(UIInterfaceOrientationMask)supportedInterfaceOrientations{//横竖屏的限制if([[
UIDevice
currentDevice]userInterfaceIdiom
biyu6
·
2023-07-14 11:28
iOS16 屏幕旋转
iOS16强行让屏幕旋转
UIDevice
.current.setValue(UIInterfaceOrientation.landscapeRight.rawValue,forKey:"orientation
小草先生
·
2023-07-14 09:57
iOS根据屏幕宽高判断当前设备型号
CGSizescreenSize=[UIScreenmainScreen].bounds.size;//如果是iPhoneif([
UIDevice
currentDevice].userInterfaceIdiom
MrWT
·
2023-06-21 23:48
ios获取手机信息
//手机序列号NSString*identifierNumber=[[
UIDevice
currentDevice]uniqueIdentifier];NSLog(@"手机序列号:%@",identifierNumber
J_HX
·
2023-06-19 07:34
iOS横竖屏切换
基础概念
UIDevice
OrientationUIInterfaceOrientationUIInterfaceOrientationMaskUIViewController相关AppDelegate相关工程配置相关横竖屏切换实例竖屏界面如何
zdsey
·
2023-06-18 10:04
ios
判断是否是全面屏的宏
defineisIos11[[[
UIDevice
currentDevice]systemVersion]floatValue]>=11defineisIphoneXisIos11?
养猪致富
·
2023-06-18 07:32
iOS 监听用户手动截屏的通知
#if__IPHONE_OS_VERSION_MAX_ALLOWED>__IPHONE_8_0if([[
UIDevice
currentDevice].systemVersionfloatValue]>=
rockyMJ
·
2023-06-14 20:40
适配 iPhone XR/XS Max
staticinlineBOOLiPhoneXSeries(){staticBOOLiPhoneXSeries=NO;staticdispatch_once_tonceToken;dispatch_once(&onceToken,^{if(
UIDevice
.currentDevice.userInterfaceIdiom
iVikings
·
2023-06-14 18:22
【Android自动化测试】Ui Automator技术(以对QQ软件自动发说说为例)
文章目录一、引言二、了解(Android官方文档)1、
UiDevice
类2、UIAutomatorAPI3、UIAutomator查看器三、使用1、依赖2、代码一、引言描述:UIAutomator是一个界面测试框架
云端new守夜人
·
2023-06-14 16:41
Android开发
android
ui
安卓自动化之uiautomator(python篇)二
UiDevice
安装环境后,我们首先学习最简单的Device这个类,这个类主要关于设备的旋转、点击、长按等操作,可查看init.py文件中的源码1.返回设备的信息d.info2.点击坐标d.click(300,500)点击横坐标为300,纵坐标为500的地方3.长按坐标d.long_click(300,500)长按横坐标为300,纵坐标为500的地方4.滑动点d.swipe(300,500,600,800)从坐标
meisailor
·
2023-06-13 16:32
uiautomator
脚本
android
python
苹果地图使用 定位 计算距离
NSLocationWhenInUseUsageDescriptionbooleanYES创建对象》设置代理>设置》开的更新位置@property(nonatomic,strong)CLLocationManager*manger;//ios8要定位,要请求定位的权限if([[
UIDevice
currentDev
1115443231
·
2023-06-13 11:47
iOS开发实战:获取手机各种权限状态
以下是可能用到的库下面是具体实现代码//充电状态+(BOOL)NativePhoneBatteryState{//打开电池的监听[
UIDevice
currentDevice].batteryMonitoringEnabled
文竹_自然
·
2023-06-13 02:41
iOS WKWebView无法加载本地css文件问题
为了性能及流畅度,将UIWebView替换为WKWebView,模拟器测试一切良好,但真机上遇到了一个大问题:CSS文件未被加载未读取css文件网上一通查阅及验证后,没有一个可行方案,大致代码如下if([[
UIDevice
currentDevice
帅气影中人
·
2023-06-11 18:38
Swift获取 iPhone 状态栏、导航栏、TabBar高度
机型状态栏高度iPhoneXR/1148iPhoneX/11Pro/11ProMax/12mini44iPhone12/12Pro/ProMax47
UIDevice
+XPAddition.swiftextensionU
小鹏学长168
·
2023-06-10 00:05
设计模式-单例
二,目的:1.满足需求.2.节省系统开销.3.方便维护.三,种类1.懒汉式:使用的时候实例化2.饿汉式四,IOS中的单例UIApplication,应用相关UIScreen,屏幕宽高,像素缩放比例
UIDevice
zhangwenqiang
·
2023-06-07 18:33
iOS 特定页面横屏设置
所以需要自己实现controller的横屏设置(因为腾讯超级播放器是view单独横屏的)废话不多说,说下解决方案(这里的场景是push的)工程设置如图image.png设置设备横屏代码extension
UIDevice
_风雨
·
2023-04-17 11:42
iOS 关于判断设备型号
使用宏定义判断设备型号//判断是否为iPhone或ipad#defineUI_IS_IPAD([[
UIDevice
currentDevice]userInterfaceIdiom]==UIUserInterfaceIdiomPad
ZhangXiaoxx
·
2023-04-17 05:32
ios获取手机型号、系统版本、设备唯一标识符、手机运营商等
//设备唯一标识符NSString*identifierStr=[[[
UIDevice
currentDevice]identifierForVendor]UUIDString];NSLog(@"设备唯一标识符
爱你呢
·
2023-04-09 12:02
iOS设备唯一标识符
一、现有方案1、UDID(UniqueDeviceIdentifier)获取方法:[[
UIDevice
currentDevice]uniqueIdentfier]不足:iOS5之后,该方法返回的结果在所有应用中都相同
王金昌
·
2023-04-08 20:11
使用UIautomator获取手机QQ登录验证码
1.启动QQpublicvoidtestDemo()throwsUiObjectNotFoundException{device=
UiDevice
.getInstance(getInstrumentation
江南丶邪公子
·
2023-04-07 18:48
Android
android
验证码
qq
uiautomato
iOS开发实战 - 跳转到APP设置页面的正确方式
现在这种是现阶段基本所有大厂都是这么操作的,话不多说,上代码if([[UIApplicationsharedApplication]canOpenURL:url]){//此处可以做一下版本适配,至于为何要做版本适配,大家应该很清楚if([
UIDevice
currentDevice
文竹_自然
·
2023-04-03 03:34
iOS 获取设备型号最新总结
其中,
UIDevice
有一个属性model只是用于获取iOS设备的类型,如iPhone,iPodtouch,iPad等;而其另一个属性name表示当前设备的名称,由用户在设置》通用》关于》名称中设定,如
努力的阿洋
·
2023-03-30 14:36
iOS-手动切换横竖屏幕
1.2跳转到第二个控制器的进行切换操作,先用
UIDevice
+TFDevice这个分类实现具体方法。1.2.1把
UIDevice
+TFDevice这个方法写好完成后,还需要在AppDelegat
丁丁丁新华
·
2023-03-30 13:05
iOS iPhone X/Xr/Xs/Xs Max 需要的宏定义
//判断是否是ipad#defineisPad([[
UIDevice
currentDevice]userInterfaceIdiom]==UIUserInterfaceIdiomPad)//判断iPhone4
闻人歌
·
2023-03-28 00:06
iOS中利用CoreMotion获取设备方向
问题:在开发自定义相机的时候,设备如果关闭了设备旋转,那么设备方向获取有一定问题在使用
UIDevice
Orientationorientation=[[
UIDevice
currentDevice]orientation
黄成
·
2023-03-25 08:13
iOS开发中iPhone和iPad的布局适配(工具篇)
UIAdaptiveKitimage.pngLayoutTool.swift:UI自动布局的便捷方法,主要有常用的宽度,高度,字体大小设置.非常用的封装在LayoutTool的struct里面.LayoutMethod.swift:为LayoutTool提供实现的方法
UIDevice
coder_xiang
·
2023-03-24 21:12
关于UITextView contentSize.height 不正确问题
直接上代码CGFloatheight=0;if([[[
UIDevice
currentDevice]systemVersion]floatValue]>=7){height=ceilf([myTextViewsizeThatFits
narutocheen
·
2023-03-22 07:46
开发记录小问题
一、关于屏幕旋转的监听
UIDevice
.orientationDidChangeNotification通知当设备手持角度发生变化即会触发,触发比较灵敏,不能体现设备真的发生了旋转打印监听方法的notification
chaeyeonyanse
·
2023-03-22 05:41
UIDevice
(设备) 官方文档翻译 by kino
概述使用
UIDevice
对象来获取关于设备的信息,比如分配的名称、设备模型、操作系统名称和版本。你还可以使用
UIDevice
实例来检测设备特征的变化,比如物理方向。
ZJK_fcb4
·
2023-03-22 01:56
UIPickView 去掉选择框
UIPickView去掉选择框UIPickerView//去掉选择框if([[
UIDevice
currentDevice].systemVersionfloatValue]2){((UIView*)[_
不会拉磨的驴
·
2023-03-21 16:26
WKWebview 白屏
所以,为了适配iOS7和iOS8,需要做版本判断:if([[[
UIDevice
currentDevice]systemVersion]intVa
Phant
·
2023-03-19 22:55
iPhone14系列导航适配和一些错误纠正
仅在iOS16系统下查看了以下问题1.项目中的一些错误:#defineNAVIGATIONBAR_HEIGHT([
UIDevice
currentDevice].isFringeScreen?
xiaoliang1
·
2023-03-17 12:49
2019-08-22
c.当用户从设备中删除所有该供应商的应用程序并随后重新安装其中一个或多个应用程序时,该值会更改获取方式:NSString*uuid=[[
UIDevice
currentDev
始于初见_yj
·
2023-03-17 09:50
iOS The
UIDevice
Family of an App Clip ('[1, 2]') must be equal to the
UIDevice
Family of its conta...
The
UIDevice
FamilyofanAppClip('[1,2]')mustbeequaltothe
UIDevice
Familyofitscontainingparentapp('[1]').image.png
Onlyoner
·
2023-03-16 19:25
IOS获取手机版本信息
//手机序列号NSString*identifierNumber=[[
UIDevice
currentDevice]uniqueIdentifier];NSLog(@"手机序列号:%@",identifierNumber
我真的真的是文艺青年
·
2023-03-16 15:33
获取设备朝向
[
UIDevice
currentDevice].orientation一般情况下可通过以上代码获取设备朝向,但是当设备开启《屏幕旋转锁定》开关后则拿不到准确的设备方向了//通过设备运动监视器来监听//初始化
Michael_涵
·
2023-03-15 17:01
UIDevice
获取苹果设备型号信息
苹果设备Models:iPhoneWiki传送门现成代码放GitHub:Github传送门注意:代码请在真机上运行,若使用模拟器会固定返回"Simulator"。苹果全家桶,支持判断的设备如下:iPhone系列iPad系列iPod系列AirPods系列AirTag系列AppleWatch系列AppleTV系列HomePod系列我是用category封装的,使用方法如下:#import"UIDevi
Geniune
·
2023-03-14 17:57
iOS 获取设备方向
方法一:UIInterfaceOrientationorientation=[UIApplicationsharedApplication].statusBarOrientation;方法二:
UIDevice
OrientationdeviceOrientation
写下岁月的痕迹
·
2023-03-13 16:49
Android自动化测试
记录2018-08-08该东西只是记录,方便你我他导包:compile'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
UiDevice
XINHAO_HAN
·
2023-03-13 16:10
iOS 拨打电话延迟
callPhoneWithPhoneNum:(NSString*)phoneNum{NSString*phoneStr=[NSStringstringWithFormat:@"tel://%@",phoneNum];if([[
UIDevice
currentDevice
小风车tl
·
2023-03-13 12:26
3D Touch----shortcutItems
pngdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions{[selfcreatShortcutItem];if(launchOptions){if([[[
UIDevice
currentD
笑看人生_44e2
·
2023-03-12 00:11
iOS 本地推送闹钟功能实现
(NSDictionary*)launchOptionsapplication:(UIApplication*)application{//注册通知if(@available(iOS8,*)){if(
UIDevice
.currentDevice.systemVersion
大宝来巡山
·
2023-03-09 08:44
判断iOS 用户设备是iPhone, iPad 还是iPod touch
先放代码,判断依据放后面代码参考如下:#pragmamark-判断用户设备是iPhone,iPad还是iPodtouch-(void)checkCurrentDevice{if([[
UIDevice
currentDevice
Sunday_David
·
2023-02-17 05:12
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他