GithubHelp home page GithubHelp logo

判断刘海屏的方式有问题,导致在 iphone 11 pro max上获取到的状态栏高度是20,进而导致标题偏上 about zxnavigationbar HOT 6 CLOSED

smilezxlee avatar smilezxlee commented on May 28, 2024
判断刘海屏的方式有问题,导致在 iphone 11 pro max上获取到的状态栏高度是20,进而导致标题偏上

from zxnavigationbar.

Comments (6)

SmileZXLee avatar SmileZXLee commented on May 28, 2024

您好,您的iPhone 11 pro max的软件版本是iOS 14的吗,我使用iOS 13.5的iPhone 11 pro max未发现您描述的问题,如果方便的话可以帮我打印一下[UIApplication sharedApplication].delegate.window.safeAreaInsets.top的值吗?感谢!

from zxnavigationbar.

vlay1314 avatar vlay1314 commented on May 28, 2024

我设置导航栏为透明的时候,切换到下一个页面的是系统的导航栏,会有向上偏移的。初始化是在layoutsubviews上初始化吗?我在viewdidload上初始化的。

from zxnavigationbar.

SmileZXLee avatar SmileZXLee commented on May 28, 2024

我设置导航栏为透明的时候,切换到下一个页面的是系统的导航栏,会有向上偏移的。初始化是在layoutsubviews上初始化吗?我在viewdidload上初始化的。

你好,方便提供一个demo或者相关代码片段和截图吗,以便我定位问题和改正,感谢!

from zxnavigationbar.

LayDownAll avatar LayDownAll commented on May 28, 2024

您好,您的iPhone 11 pro max的软件版本是iOS 14的吗,我使用iOS 13.5的iPhone 11 pro max未发现您描述的问题,如果方便的话可以帮我打印一下[UIApplication sharedApplication].delegate.window.safeAreaInsets.top的值吗?感谢!

po [UIApplication sharedApplication].delegate.window.safeAreaInsets.top
error: <user expression 0>:1:44: property 'window' not found on object of type 'id' 可能是因为我是用了SceneDelegate,所以你这种获取高度的方式好像不行,因为这个时候AppDelegate没有window这个属性了

from zxnavigationbar.

SmileZXLee avatar SmileZXLee commented on May 28, 2024

您好,您的iPhone 11 pro max的软件版本是iOS 14的吗,我使用iOS 13.5的iPhone 11 pro max未发现您描述的问题,如果方便的话可以帮我打印一下[UIApplication sharedApplication].delegate.window.safeAreaInsets.top的值吗?感谢!

po [UIApplication sharedApplication].delegate.window.safeAreaInsets.top
error: <user expression 0>:1:44: property 'window' not found on object of type 'id' 可能是因为我是用了SceneDelegate,所以你这种获取高度的方式好像不行,因为这个时候AppDelegate没有window这个属性了

感谢您的反馈与帮助,我在1.2.3版本中修复了这一问题,您可以更新一下。

from zxnavigationbar.

SmileZXLee avatar SmileZXLee commented on May 28, 2024

我设置导航栏为透明的时候,切换到下一个页面的是系统的导航栏,会有向上偏移的。初始化是在layoutsubviews上初始化吗?我在viewdidload上初始化的。

请您在使用系统导航栏的控制器的-viewDidLoad方法中作如下设置:

//注意,因系统导航栏默认被隐藏,请手动设置显示导航栏
self.navigationController.navigationBarHidden = NO;
 //如果希望view从导航栏下方开始,请设置系统导航栏为不透明
 self.navigationController.navigationBar.translucent = NO;

from zxnavigationbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.