南鑫林 5 gadi atpakaļ
vecāks
revīzija
f17f23fbe7

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/TopicSelection/View/TopicSelectionCollectionViewCell.swift

@@ -70,6 +70,7 @@ class TopicSelectionCollectionViewCell: UICollectionViewCell {
         let selectionButton = UIButton(type: UIButton.ButtonType.custom)
         selectionButton.setImage(kImage(name: "hg_image_not_selected"), for: UIControl.State.normal)
         selectionButton.setImage(kImage(name: "hg_image_selected"), for: UIControl.State.selected)
+        selectionButton.isUserInteractionEnabled = false
         return selectionButton
     }()
     

+ 11 - 0
RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/TopicSelection/ViewController/TopicSelectionViewController.swift

@@ -105,6 +105,16 @@ class TopicSelectionViewController: BaseViewController {
         goButton.isEnabled = false
         goButton.cornerRadius = 22 * kScaleWidth
         goButton.masksToBounds = true
+        goButton.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+            if self?.presentingViewController != nil {
+                self?.dismiss(animated: false, completion: {
+                    kAppDelegate.setTabbarController()
+                })
+            } else {
+                kAppDelegate.setTabbarController()
+            }
+        }).disposed(by: disposeBag)
         return goButton
     }()
 
@@ -135,6 +145,7 @@ extension TopicSelectionViewController: UICollectionViewDelegateFlowLayout,UICol
         }else {
             indexPathDict.removeValue(forKey: indexPath.row)
         }
+        collectionView.reloadItems(at: [indexPath])
         goButton.isEnabled = indexPathDict.count >= 3 ? true : false
     }