Comments (3)
这句 viewController.view.backgroundColor = kColor_ViewBg;
改变了正常的初始化顺序,如果在 viewDidLoad
里设置导航栏背景样式的话,这个时候 self.navigationController
的值为 nil,所以其实并没有设置成功。
推荐把 viewController.view.backgroundColor = kColor_ViewBg;
放到别的地方,比如 viewDidLoad
里。
from kmnavigationbartransition.
不用继承的话... 下面代码放到哪里合适呢~
viewController.view.backgroundColor = kColor_ViewBg;
from kmnavigationbartransition.
放基类里应该是比较好的方案吧,可以用 Method Swizzling,但是不太推荐。
from kmnavigationbartransition.
Related Issues (20)
- iOS13暗黑模式适配 HOT 1
- iOS 14 适配问题 HOT 11
- 真级se ,iOS 12.4 播放器切换横屏,在动画的时候会崩溃, 其他机型包括模拟器都不会 HOT 2
- Navigation bar flashing on iOS 14 HOT 8
- Items/Elements on the Navigation Bar Transition
- 特定情况下返回时导航栏抖动 HOT 1
- KMNavigationBarTransition 与 转场框架 Hero 冲突 HOT 5
- navigationController?.navigationBar.shadowImage 设置异常失效 HOT 2
- navigationBar.isTranslucent = true,页面背景色不同时跳转,会有闪烁 HOT 4
- 会第三方键盘IQKeyboardManager冲突
- iOS15 系统上,界面跳转导航有闪烁
- 在iOS15,Xcode-Beta导航栏有适配的问题
- iOS15如何适配? HOT 4
- iOS15设置导航字体颜色 自动变为系统设置 HOT 3
- iOS15 透明导航栏跳转到不透明导航栏页面的动画闪卡一下 HOT 2
- 如何禁用iOS15导航滑动变白? HOT 1
- iOS 14 iOS 13 跳转到隐藏导航栏的页面,或者修改导航颜色的页面,导航会闪一下。 HOT 2
- iOS15导航栏标题样式异常 HOT 1
- The format is not normal
- iOS17导航异常问题 HOT 4
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 kmnavigationbartransition.