Commit 1520a182 authored by DavidHuang's avatar DavidHuang

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

parent 81610e5a
......@@ -89,18 +89,21 @@ extension YHTabBarViewController {
if let model = notification.object as? TabBarShareModel {
shareModel = model
if model.showFlag {
self.shareView.isHidden = false
self.shareView.layer.opacity = 0.0
UIView.animate(withDuration: 0.25, delay: 0, options: [.curveEaseIn]) {
self.shareView.layer.opacity = 1.0
} completion: { finish in }
} else {
shareView.layer.opacity = 1.0
UIView.animate(withDuration: 0.25, delay: 0, options: [.curveEaseOut]) {
if self.shareView.isHidden {
self.shareView.isHidden = false
self.shareView.layer.opacity = 0.0
} completion: { finish in
self.shareView.isHidden = true
UIView.animate(withDuration: 0.25, delay: 0, options: [.curveEaseIn]) {
self.shareView.layer.opacity = 1.0
} completion: { finish in }
}
} else {
if self.shareView.isHidden == false {
shareView.layer.opacity = 1.0
UIView.animate(withDuration: 0.25, delay: 0, options: [.curveEaseOut]) {
self.shareView.layer.opacity = 0.0
} completion: { finish in
self.shareView.isHidden = true
}
}
}
}
......
......@@ -283,6 +283,13 @@ extension YHHomeHoldViewPageViewController {
extension YHHomeHoldViewPageViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
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()
}
}
......
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