iThinkerYZ/YZDisplayViewController

iphoneX下面标题会错乱

Opened this issue · 6 comments

在iphoneX上标题错乱

ios 11下面也不正常,啥时候更新啊

什么时候适配iPhoneX

同问

sjxt commented

这个应该进去改一下源码的导航栏高度就好了吧

// 导航条高度
#define YZNavBarH kTopHeight

XXX.pch

//   iPhoneX适配
#define kStatusBarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
#define kNavBarHeight 44.0
#define kTabBarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height>20?83:49)
#define kTopHeight (kStatusBarHeight + kNavBarHeight)

YZDisplayViewController.m

- (void)initial
{
    // 初始化标题高度
    _titleHeight = YZTitleScrollViewH;
    
    self.extendedLayoutIncludesOpaqueBars = YES;
    if (@available(iOS 11.0, *)) {
        self.contentScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    } else {
        self.automaticallyAdjustsScrollViewInsets = NO;
    }
}