amisare / nnnavigationbar Goto Github PK
View Code? Open in Web Editor NEWNNNavigationBar 实现导航条背景渐变过渡动画的轻量级框架
License: MIT License
NNNavigationBar 实现导航条背景渐变过渡动画的轻量级框架
License: MIT License
[self.navigationItem.rightBarButtonItem setTitleTextAttributes:@{NSForegroundColorAttributeName : UIColor.h1TitleColor, NSFontAttributeName : FONT(12)} forState:UIControlStateNormal];
[self.navigationItem.rightBarButtonItem setTitleTextAttributes:@{NSForegroundColorAttributeName : UIColor.h1TitleColor, NSFontAttributeName : FONT(12)} forState:UIControlStateHighlighted];
[self.navigationItem.rightBarButtonItem setTitleTextAttributes:@{NSForegroundColorAttributeName : UIColor.h1TitleColor, NSFontAttributeName : FONT(12)} forState:UIControlStateDisabled];
Hello Sir. I'm a UI/UX and Graphics Designer. I'm happy to see an open source project, So, I want provide a logo for you. Would you mind if I propose a new logo design for your project as my Open Source Contribution?
Thanks before.
标题字体颜色无法修改,不是指状态栏的标题。控制器的title的字体颜色
A.nn_backgroundAlpha = 1.f;
B.nn_backgroundAlpha = 0.f;
A.statusBar.hidden = NO
B.statusBar.hidden = YES
此时侧滑返回 导航栏的白色背景少了状态栏那一块
标题栏的字体颜色也能设置吗?
目前事件被拦截, 设置alpha=0, 无法响应交互
bug 描述:导航右滑返回手势,概率性的导致返回以后页面的 rightBarButtonItem 的 tintColor 颜色变浅, bug 现象如下:
bug 代码:
override func viewDidLoad() {
super.viewDidLoad()
// 在 viewDidLoad 中设置 rightBarButtonItem
self.navigationItem.rightBarButtonItem = UIBarButtonItem.init(title: "Next", style: .plain, target: self, action: #selector(pushNextViewController))
self.view.backgroundColor = UIColor.white
self.title = "Title" + " " + "\(self.page)"
}
@objc public func pushNextViewController() {
let vc = self.nextViewController;
vc.page = self.page + 1
self.navigationController?.pushViewController(vc, animated: true)
}
bug 解决:
override func viewDidLoad() {
super.viewDidLoad()
// 将 rightBarButtonItem 设置移至 viewWillAppear
// self.navigationItem.rightBarButtonItem = UIBarButtonItem.init(title: "Next", style: .plain, target: self, action: #selector(pushNextViewController))
self.view.backgroundColor = UIColor.white
self.title = "Title" + " " + "\(self.page)"
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// 在 viewWillAppear 中设置 rightBarButtonItem
self.navigationItem.rightBarButtonItem = UIBarButtonItem.init(title: "Next", style: .plain, target: self, action: #selector(pushNextViewController))
}
@objc public func pushNextViewController() {
let vc = self.nextViewController;
vc.page = self.page + 1
self.navigationController?.pushViewController(vc, animated: true)
}
bug 工程源码:UINavigationBarBug
UINavigationBar.appearance().tintColor 也设置无效
A页面有分割线
B页面无分割线
C 类似于个人中心, 默认透明导航栏无分割线, 滑动一定偏移量之后显示导航栏和分割线
这种实现方式应该可以和您导航栏实现方式使用同样的方法实现吧?
Non-public API usage:
The app references non-public selectors in xxx: _activeBarMetrics, _barPosition, _cancelInteractiveTransition:completionSpeed:completionCurve:, _completePopOperationAnimated:transitionAssistant:, _completePushOperationAnimated:transitionAssistant:, _didVisibleItemsChangeWithNewItems:oldItems:, _finishInteractiveTransition:completionSpeed:completionCurve:, _popNavigationItemWithTransition:, _pushNavigationItem:transition:, _updateInteractiveTransition:
If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.
上面是苹果机审打回来的原因,现在审核很严,这种hook的方法看来已经不行了,望知悉。
手机更新到iOS13.1系统后,报这个错误
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.