Comments (12)
为啥会导致 fake bar 的 frame 有问题呢?
有截图或者能重现问题的代码吗?
from ypnavigationbartransition.
能提供个联系方式吗,qq或者微信 我截图发您一下,主要原因是我设置的不透明,但是你这一步自己写了个透明的configuration
if (toVC.extendedLayoutIncludesOpaqueBars ||
navigationBar.translucent) {
fakeBarFrame.origin.y = 0;
}
我的零点是在导航下方,没设置在顶部,你这个必须要设置0点在导航栏上方吗
from ypnavigationbartransition.
设置一个透明的 configure 是为了把真正的导航栏变成透明的,这样两个 fake bar 才能显示出来。
你的导航栏是 opaque 的,然后 self.view 的左上角在导航栏底部,这种情况我建议你设置你的 viewController
的 extendedLayoutIncludesOpaqueBars
为 YES,即使导航栏是不透明的,也让 self.view 到导航栏下面去。
然后控制好 scrollview 的 content insets 就没问题了。
from ypnavigationbartransition.
if (toVC.extendedLayoutIncludesOpaqueBars ||
navigationBar.translucent) {
// fakeBarFrame.origin.y = 0;
}
我把这句话删掉就可以解决我的问题,正常cover回来的frame就是-64,你这里改为0会倒置fakebar在导航下方,你这里是否可以兼容一下,不要强制0点在上面,我这是老工程,如果改0点所有页面都得改。
from ypnavigationbartransition.
你这里为么要判断这个navigationBar.translucent,你这个只要显示fakebar必然是透明的,你应该判断showConfigure也就是目标vc的透明度,来做兼容是否修改frame
from ypnavigationbartransition.
这样其他人接入的时候就不会有限制必须设置 extendedLayoutIncludesOpaqueBars 为 YES或者edgesForExtendedLayout,你都可以兼容
from ypnavigationbartransition.
if (toVC.extendedLayoutIncludesOpaqueBars ||
showConfigure.translucent) {
fakeBarFrame.origin.y = 0;
}
这样改
from ypnavigationbartransition.
你测一下把 navigationBar.translucent
的判断去掉是不是在你的 app 所有需要用 fake bar 的地方没问题。我晚些时候有空了来细看一下这块,测一下别的用例,你着急的话可以先 fork 一份用你改过的版本。
确认问题之后我会在近期发布更新。感谢反馈!
from ypnavigationbartransition.
我记得是之前遇到了什么问题我才改成这样的,但具体啥问题想不起来了。
from ypnavigationbartransition.
嗯我先改成if (toVC.extendedLayoutIncludesOpaqueBars ||
showConfigure.translucent) {
fakeBarFrame.origin.y = 0;
}我先用着 ,我这测试我这是用没问题,你可以测试一下0点在导航上方的做下兼容,你本身写的判断就是有问题的,是一个一定会走的判断因为导航一定是透明在显示fakevbar的情况下,有时间你可以更新一下,哈哈
from ypnavigationbartransition.
提个 PR 给我吧,可能把 navigationBar.translucent
改成 showConfigure.translucent
就解决所有问题了。
from ypnavigationbartransition.
发布在 2.0.5 版本了。
from ypnavigationbartransition.
Related Issues (20)
- iOS 13下,设置tintColor失效 HOT 10
- 必需要把项目中的NavigationController继承YPNavigationController吗? HOT 1
- 無法返回 HOT 2
- 我自己的问题
- 如何设置导航栏为高斯模糊的效果 HOT 1
- navigationbar 在 hidden 情况下 设置statusbar 颜色为白色 HOT 3
- iOS13暗黑模式
- 新版模态方式,会引起闪退
- 列表界面设置contentInsetAdjustmentBehavior属性,会出现列表抖动 HOT 1
- Swift 如何实现呀 感觉有点懵呢 HOT 2
- navigation 设置 hidden 隐藏,导航底部线条再也无法恢复 HOT 6
- yp_navigationBackgroundImageWithIdentifier 咨询
- 请问继承了YPNavigationController的导航控制器应该怎么处理全屏滑动返回呢 HOT 7
- 使用这个框架后代码强制横屏失败 HOT 1
- 这样设置,TintColor无效,导航栏文字始终是白色什么原因呢?
- 请问什么时候能适配iOS15? HOT 14
- 这套框架还有没有人更新维护的 HOT 1
- 适配iOS 15 HOT 1
- 2.2.1 & 2.2.2 导航不能透明?
- 这 repo 太好用了。 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ypnavigationbartransition.