ios 11与iphone x的相关适配问题及处理办法_IOS
发表时间:2025-10-10 来源:本站整理相关软件相关文章人气:
[[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeRight) {
return DeviceOrientationTypeHorizontalScreen;
}else {
return DeviceOrientationTypeOther;
}
}
+(BOOL)isSmallScreen{
if (Screen_width >=375 && Screen_height >= 667) {
return NO;
}else {
return YES;
}
}
-(CGFloat)getTabBarContentHeight {
if (!UIEdgeInsetsEqualToEdgeInsets(UIEdgeInsetsZero, WindowSafeAreaInsets)) {
//if ([self getDeviceType] == DeviceTypeIphoneXScreen) {
if ([self getDeviceOrientationType] == DeviceOrientationTypeHorizontalScreen) {
if (self.isAccordingToSafeArea) {
return 32;
}else {
return 49;
}
}else {
return 49;
}
}else {
return 49;
}
}
-(CGFloat)getNavContentHeight {
if (!UIEdgeInsetsEqualToEdgeInsets(UIEdgeInsetsZero, WindowSafeAreaInsets)) {
// }
// if ([self getDeviceType] == DeviceTypeIphoneXScreen) {
if ([self getDeviceOrientationType] == DeviceOrientationTypeHorizontalScreen) {
if (self.isAccordingToSafeArea) {
return 32;
}else {
return 44;
}
}else {
return 44;
}
}else {
return 44;
}
}
-(CGFloat)getStatusBarHeight {
return [[UIApplication sharedApplication] statusBarFrame].size.height;
}
-(CGFloat)getNavAndStatusBarHeight {
return [self getNavContentHeight]+[self getStatusBarHeight];
}
-(CGFloat)getTabBarAndVirtualHomeHeight {
return [self getTabBarContentHeight]+WindowSafeAreaInsets.bottom;
}
@end
总结
以上所述是小编给大家介绍的ios 11和iphone x的相关适配问题及解决方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对本站网站的支持!
您可能感兴趣的文章:- iOS11和iPhoneX适配的一些坑
- 详解iOS11、iPhone X、Xcode9 适配指南
- iPhone X官方文档的适配学习详解
- iPhoneX无导航栏页面适配问题解决方案
- 浅谈iphone X的简单适配问题(推荐)
- 微信小程序中吸底按钮适配iPhone X方案
- 关于适配iOS11和iPhoneX的一些事
- iOS11&iPhoneX适配&Xcode9打包注意事项
- iOS 11更新后及iPhone X推出后工程中遇到的问题及适配方法
- iPhoneX 各种适配记录笔记(超全面)
目前高端手机市场,iPhone手机快要形成一家独大的形势。