Commit 1520a182 authored by DavidHuang's avatar DavidHuang

tabbar上分享按钮的 隐藏场景 完善

parent 81610e5a
...@@ -89,13 +89,15 @@ extension YHTabBarViewController { ...@@ -89,13 +89,15 @@ extension YHTabBarViewController {
if let model = notification.object as? TabBarShareModel { if let model = notification.object as? TabBarShareModel {
shareModel = model shareModel = model
if model.showFlag { if model.showFlag {
if self.shareView.isHidden {
self.shareView.isHidden = false self.shareView.isHidden = false
self.shareView.layer.opacity = 0.0 self.shareView.layer.opacity = 0.0
UIView.animate(withDuration: 0.25, delay: 0, options: [.curveEaseIn]) { UIView.animate(withDuration: 0.25, delay: 0, options: [.curveEaseIn]) {
self.shareView.layer.opacity = 1.0 self.shareView.layer.opacity = 1.0
} completion: { finish in } } completion: { finish in }
}
} else { } else {
if self.shareView.isHidden == false {
shareView.layer.opacity = 1.0 shareView.layer.opacity = 1.0
UIView.animate(withDuration: 0.25, delay: 0, options: [.curveEaseOut]) { UIView.animate(withDuration: 0.25, delay: 0, options: [.curveEaseOut]) {
self.shareView.layer.opacity = 0.0 self.shareView.layer.opacity = 0.0
...@@ -105,6 +107,7 @@ extension YHTabBarViewController { ...@@ -105,6 +107,7 @@ extension YHTabBarViewController {
} }
} }
} }
}
@objc func clearAllUnreadBadge() { @objc func clearAllUnreadBadge() {
DispatchQueue.main.async { DispatchQueue.main.async {
......
...@@ -283,6 +283,13 @@ extension YHHomeHoldViewPageViewController { ...@@ -283,6 +283,13 @@ extension YHHomeHoldViewPageViewController {
extension YHHomeHoldViewPageViewController: JXSegmentedViewDelegate { extension YHHomeHoldViewPageViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) { func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
navigationController?.interactivePopGestureRecognizer?.isEnabled = (segmentedView.selectedIndex == 0) navigationController?.interactivePopGestureRecognizer?.isEnabled = (segmentedView.selectedIndex == 0)
if segmentedView.selectedIndex != 1 {
var model = TabBarShareModel()
model.showFlag = false
NotificationCenter.default.post(name: YhConstant.YhNotification.changeShareViewStatusOnTabBarNotifiction, object: model)
}
self.segmentedView.reloadDataWithoutListContainer() self.segmentedView.reloadDataWithoutListContainer()
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment