Commit 20b894c4 authored by David黄金龙's avatar David黄金龙

修改 首页跳转的bug

parent ca303a56
......@@ -129,6 +129,9 @@ class YHCommunityViewController: YHBaseViewController {
NotificationCenter.default.addObserver(self, selector: #selector(goActivityVC), name: YhConstant.YhNotification.goActivityVCNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(goConnectionVC), name: YhConstant.YhNotification.goConnectionVCNotifiction, object: nil)
for i in 0..<arrItemTitles.count {
if i != 0 {
let vc = YHActivityListViewController()
......@@ -210,6 +213,12 @@ class YHCommunityViewController: YHBaseViewController {
@objc func goActivityVC() {
segmentedView.selectItemAt(index: 1)
}
@objc func goConnectionVC() {
segmentedView.selectItemAt(index: 0)
}
}
extension YHCommunityViewController: JXSegmentedViewDelegate {
......
......@@ -73,15 +73,9 @@ extension YHAiRadarAreaView {
@objc func tapButton(gestureRecognizer:UITapGestureRecognizer) {
goTabBarBy(tabType: .community)
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
// NotificationCenter.default.post(name: YhConstant.YhNotification.goActivityVCNotifiction, object: nil)
// })
DispatchQueue.main.async {
NotificationCenter.default.post(name: YhConstant.YhNotification.goActivityVCNotifiction, object: nil)
NotificationCenter.default.post(name: YhConstant.YhNotification.goConnectionVCNotifiction, object: nil)
}
}
func setupUI() {
......
......@@ -66,6 +66,9 @@ extension YHHomeSalonAreaView {
@objc func tapButton(gestureRecognizer:UITapGestureRecognizer) {
goTabBarBy(tabType: .community)
DispatchQueue.main.async {
NotificationCenter.default.post(name: YhConstant.YhNotification.goActivityVCNotifiction, object: nil)
}
}
func setupUI() {
......
......@@ -250,6 +250,9 @@ extension YhConstant {
// 跳转 社区的活动页
public static let goActivityVCNotifiction = Notification.Name(rawValue: "com.yinhe.goActivityVCNotifiction")
// 跳转 社区的人脉页
public static let goConnectionVCNotifiction = Notification.Name(rawValue: "com.yinhe.goConnectionVCNotifiction")
}
}
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