Kaynağa Gözat

修复了现有的bug

南鑫林 5 yıl önce
ebeveyn
işleme
0f0574aca5

BIN
.DS_Store


+ 1 - 1
RainbowPlanet/Podfile

@@ -1,4 +1,4 @@
-#source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
+source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
 # Uncomment the next line to define a global platform for your project
  platform :ios, '10.0'
 

+ 5 - 5
RainbowPlanet/Podfile.lock

@@ -41,7 +41,7 @@ PODS:
   - JSONModel (1.7.0)
   - JXSegmentedView (0.0.19)
   - KeychainAccess (3.2.0)
-  - Kingfisher (4.10.1)
+  - Kingfisher (5.7.1)
   - lottie-ios (3.1.2)
   - LYEmptyView (1.3.0)
   - Masonry (1.1.0)
@@ -151,7 +151,7 @@ DEPENDENCIES:
   - ZipArchive (= 1.4.0)
 
 SPEC REPOS:
-  https://github.com/cocoapods/specs.git:
+  https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git:
     - AFNetworking
     - Alamofire
     - AlivcConan
@@ -224,7 +224,7 @@ SPEC CHECKSUMS:
   JSONModel: 840bc0fcffb24b8454d2c026bf26fea454b8e98d
   JXSegmentedView: 6e22381bd1e6f0767fc078bef1947b13b2d337a1
   KeychainAccess: 3b1bf8a77eb4c6ea1ce9404c292e48f948954c6b
-  Kingfisher: c148cd7b47ebde9989f6bc7c27dcaa79d81279a0
+  Kingfisher: 176d377ad339113c99ad4980cbae687f807e20fe
   lottie-ios: 49cd85b1f24f61a7708ad7ec76a523ab2d0e3100
   LYEmptyView: bd85bfb78e943b30df3d34bcc2534f21b999938e
   Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
@@ -253,6 +253,6 @@ SPEC CHECKSUMS:
   YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
   ZipArchive: e25a4373192673e3229ac8d6e9f64a3e5713c966
 
-PODFILE CHECKSUM: e792d8f1072d2e2d566e4d47594e9772c674d58a
+PODFILE CHECKSUM: 3b5dd2292cf05c2ea5c982166e303fae64f35b96
 
-COCOAPODS: 1.7.5
+COCOAPODS: 1.8.0

+ 0 - 9
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+Window.swift

@@ -117,15 +117,6 @@ extension AppDelegate {
         WRNavigationBar.defaultNavBarBackgroundImage = UIImage.imageWithColor(color: kThemeColor)
         
         UINavigationBar.appearance().tintColor = UIColor.white
-        let tmpImage = UIImage(named: "navbar_back_white")
-        
-        let newSize = CGSize(width: 22, height: 22)
-        UIGraphicsBeginImageContextWithOptions(newSize, _: false, _: 0.0)
-        tmpImage?.draw(in: CGRect(x: 0, y: 0, width: newSize.width, height: newSize.height))
-        let backButtonImage = UIGraphicsGetImageFromCurrentImageContext()
-        UIGraphicsEndImageContext()
-        UINavigationBar.appearance().backIndicatorImage = backButtonImage
-        UINavigationBar.appearance().backIndicatorTransitionMaskImage = backButtonImage
     }
 
     ///设置全局的Tabbar

+ 2 - 2
RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabbarViewController.swift

@@ -118,7 +118,7 @@ class BaseTabbarViewController: NSObject {
 //        v1.tabBarItem = ESTabBarItem.init(lottieAnimateContentView1, title: "社区", image: UIImage(named: "tabbar_home")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal), selectedImage: nil)
 //        v2.tabBarItem = ESTabBarItem.init(lottieAnimateContentView2, title: "福利", image: UIImage(named: "tabbar_shopping")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal), selectedImage: nil)
         tabBarItemStyle(navc: v1, normalImg: "tabbar_home", selectorImg: "tabbar_home_pre", title: "社区")
-        tabBarItemStyle(navc: v2, normalImg: "tabbar_shopping", selectorImg: "tabbar_shopping_pre", title: "福利")
+        tabBarItemStyle(navc: v2, normalImg: "tabbar_shopping", selectorImg: "tabbar_shopping_pre", title: "后院")
         v3.tabBarItem = UITabBarItem(title: nil, image: UIImage(named: "tabbar_publish")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal), selectedImage: UIImage(named: "tabbar_publish")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal))
         v3.tabBarItem.imageInsets = UIEdgeInsets(top: 4, left: 0, bottom: -4, right: 0);
         tabBarItemStyle(navc: v4, normalImg: "tabbar_massage", selectorImg: "tabbar_massage_pre", title: "消息")
@@ -171,7 +171,7 @@ class BaseTabbarViewController: NSObject {
 //        v4.tabBarItem = ESTabBarItem.init(BaseTabBarItemContentView(), title: "消息", image: UIImage(named: "tabbar_massage")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal), selectedImage:nil)
 //        v5.tabBarItem = ESTabBarItem.init(BaseTabBarItemContentView(), title: "我的", image: UIImage(named: "tabbar_my")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal), selectedImage:nil)
         tabBarItemStyle(navc: v1, normalImg: "tabbar_home", selectorImg: "tabbar_home_pre", title: "社区")
-        tabBarItemStyle(navc: v2, normalImg: "tabbar_shopping", selectorImg: "tabbar_shopping_pre", title: "福利")
+        tabBarItemStyle(navc: v2, normalImg: "tabbar_shopping", selectorImg: "tabbar_shopping_pre", title: "后院")
         v3.tabBarItem = UITabBarItem(title: nil, image: UIImage(named: "tabbar_publish")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal), selectedImage: UIImage(named: "tabbar_publish")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal))
         v3.tabBarItem.imageInsets = UIEdgeInsets(top: 4, left: 0, bottom: -4, right: 0);
         tabBarItemStyle(navc: v4, normalImg: "tabbar_massage", selectorImg: "tabbar_massage_pre", title: "消息")

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/BackyardModule/Backyard/ViewController/BackyardViewController.swift

@@ -27,7 +27,6 @@ class BackyardViewController: BaseJSWebViewController {
         super.viewDidLoad()
         
         self.URLString = kH5PlanetUrl
-        statusBarStyle = .lightContent
         navigationBar.isHidden = true
          setupViews()
         setupData()
@@ -36,6 +35,7 @@ class BackyardViewController: BaseJSWebViewController {
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
         navigationController?.navigationBar.isHidden = true
+        statusBarStyle = .lightContent
     }
     
     override func didReceiveMemoryWarning() {

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/View/AllCommentCell/RecommendSubCommentTableViewCell.swift

@@ -69,7 +69,7 @@ class RecommendSubCommentTableViewCell: UITableViewCell {
             make.height.equalTo(17)
         }
         contentLabel.snp.makeConstraints { (make) in
-            make.top.equalTo(titleLabel.snp_bottom).offset(12)
+            make.top.equalTo(titleLabel.snp_bottom).offset(8)
             make.left.equalTo(titleLabel.snp_left)
             make.right.equalToSuperview().offset(-10)
             make.width.equalTo(kScreenWidth-62-54)
@@ -251,7 +251,7 @@ class RecommendSubCommentTableViewCell: UITableViewCell {
             contentLabel.sizeToFit()
             let contentLabelHeight = contentLabel.text?.heightForComment(font: kRegularFont14!, width: kScreenWidth - 24 - 92)
             let subViewHeight = 17.0 + (contentLabelHeight ?? 0) + 15.0
-            let spacHeight = 10.0 + 12 + 8.0
+            let spacHeight = 10.0 + 8 + 8.0 + 5
             communityPostReplyModel?.height = CGFloat(subViewHeight) + CGFloat(spacHeight)
         }
     }

+ 12 - 21
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/View/RecommendBottomCommentView.swift

@@ -30,7 +30,6 @@ class RecommendBottomCommentView: BaseView {
         addSubview(bgView)
         bgView.addSubview(commentView)
         commentView.addSubview(commentLabel)
-        commentView.addSubview(textBtn)
         bgView.addSubview(likeBtn)
         bgView.addSubview(collectBtn)
         bgView.addSubview(commentBtn)
@@ -59,7 +58,7 @@ class RecommendBottomCommentView: BaseView {
         collectAnimationView.snp.makeConstraints { (make) in
             make.edges.equalToSuperview()
         }
-        
+
         likeBtn.snp.makeConstraints { (make) in
             make.right.equalTo(collectBtn.snp_left).offset(-15)
             make.centerY.equalToSuperview()
@@ -69,7 +68,6 @@ class RecommendBottomCommentView: BaseView {
         praiseAnimationView.snp.makeConstraints { (make) in
             make.edges.equalToSuperview()
         }
-        
         commentView.snp.makeConstraints { (make) in
             make.centerY.equalToSuperview()
             make.left.equalToSuperview().offset(14)
@@ -82,9 +80,6 @@ class RecommendBottomCommentView: BaseView {
             make.width.equalTo(70)
             make.height.equalTo(28)
         }
-        textBtn.snp.makeConstraints { (make) in
-            make.edges.equalToSuperview()
-        }
         
     }
     
@@ -98,9 +93,20 @@ class RecommendBottomCommentView: BaseView {
         commentView.backgroundColor = kfafafaColor
         commentView.cornerRadius = 15
         commentView.masksToBounds = true
+        commentView.addTapGesture(1, target: self, action: #selector(commentAction))
         return commentView
     }()
     
+    @objc func commentAction()  {
+        if UserModel.isTokenNil() {
+            kAppDelegate.setLogin()
+        }else {
+            if let bottomClickClosure = self.bottomClickClosure {
+                bottomClickClosure(BottomClickType.typeComment)
+            }
+        }
+    }
+    
     private lazy var commentLabel: UILabel = {
         let commentLabel = UILabel()
         commentLabel.text = "添加评论..."
@@ -109,21 +115,6 @@ class RecommendBottomCommentView: BaseView {
         return commentLabel
     }()
     
-    private lazy var textBtn: UIButton = {
-        let textBtn = UIButton(type: UIButton.ButtonType.custom)
-        textBtn.rx.tap.subscribe(onNext: { [weak self] (data) in
-            if UserModel.isTokenNil() {
-                kAppDelegate.setLogin()
-            }else {
-                if let bottomClickClosure = self?.bottomClickClosure {
-                    bottomClickClosure(BottomClickType.typeComment)
-                }
-            }
-
-        }).disposed(by: disposeBag)
-        return textBtn
-    }()
-    
     private lazy var collectAnimationView: AnimationView = {
         let collectAnimationView = AnimationView()
         let animation = Animation.named("collect")

+ 39 - 21
RainbowPlanet/RainbowPlanet/Modules/RongCloudIMModule/IMChatRoom/ViewController/IMChatRoomViewController.swift

@@ -16,29 +16,52 @@ class IMChatRoomViewController: RCConversationViewController {
     /// 聊天室名字
     var roomName : String?
     
+    override var preferredStatusBarStyle: UIStatusBarStyle {
+        return .lightContent
+    }
     
     deinit {
         NXLLog("deinit")
     }
     
-    override var preferredStatusBarStyle: UIStatusBarStyle {
-        return .lightContent
-    }
+    lazy var navigationBar = WRCustomNavigationBar.CustomNavigationBar()
     
     override func viewDidLoad() {
         super.viewDidLoad()
-        self.navigationItem.title = roomName;
-        navigationItem.rightBarButtonItem = nil
-        navigationItem.leftBarButtonItem = UIBarButtonItem(image: kImage(name: "navbar_back_white"), style: UIBarButtonItem.Style.plain, target: self, action: #selector(backAction(sender:)))
-
+        setupNavigationBar()
+        setRCIM()
+        
+    }
+    
+    fileprivate func setupNavigationBar()
+    {
         navigationController?.interactivePopGestureRecognizer?.delegate = self
-        navigationController?.navigationBar.shadowImage = UIImage()
-        UINavigationBar.appearance().isTranslucent = false
+        navigationBar.wr_setBottomLineHidden(hidden: true)
+        navigationBar.barBackgroundColor = kThemeColor
+        navigationBar.titleLabelColor = UIColor.white
+        navigationBar.title = roomName
         statusBarStyle = .lightContent
-        navBarTitleColor = UIColor.white
-        navBarBarTintColor = kThemeColor
-        setRCIM()
+        view.addSubview(navigationBar)
         
+        if self.navigationController != nil {
+            if self.navigationController?.viewControllers.count == 1 {
+                if self.navigationController?.presentingViewController != nil {
+                    setLeftButton(image: UIImage(named: "navbar_back_white")! )
+                }
+            } else {
+                setLeftButton(image: UIImage(named: "navbar_back_white")!)
+            }
+        } else {
+            setLeftButton(image: UIImage(named: "navbar_back_white")!)
+        }
+    }
+    
+    private func setLeftButton(image:UIImage) {
+        navigationBar.wr_setLeftButton(image: image)
+        navigationBar.onClickLeftButton = {
+            [weak self] in
+            self?.wr_toLastViewController(animated: true)
+        }
     }
     
     
@@ -49,17 +72,11 @@ class IMChatRoomViewController: RCConversationViewController {
     
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
-        navigationController?.navigationBar.isHidden = false
+        self.navigationItem.leftBarButtonItem = nil
+        self.navigationItem.rightBarButtonItem = nil
+        self.navigationController?.isNavigationBarHidden = true
         navigationController?.navigationBar.isTranslucent = false
-        navigationItem.leftBarButtonItem = UIBarButtonItem(image: kImage(name: "navbar_back_white"), style: UIBarButtonItem.Style.done, target: self, action: #selector(backAction(sender:)))
         UICollectionView.appearance().contentInset = UIEdgeInsets(top: 0,left: 0,bottom: 0,right: 0)
-
-    }
-    
-    override func viewWillDisappear(_ animated: Bool) {
-        super.viewWillDisappear(animated)
-        navigationItem.leftBarButtonItem = UIBarButtonItem(image: kImage(name: "navbar_back_white"), style: UIBarButtonItem.Style.done, target: self, action: #selector(backAction(sender:)))
-
     }
     
     func setRCIM() {
@@ -96,6 +113,7 @@ class IMChatRoomViewController: RCConversationViewController {
         WRNavigationBar.defaultNavBarTitleColor = UIColor.white
         WRNavigationBar.defaultNavBarTintColor = UIColor.white
         WRNavigationBar.defaultNavBarBackgroundImage = UIImage.imageWithColor(color: kThemeColor)
+        self.navigationController?.isNavigationBarHidden = false
         UINavigationBar.appearance().tintColor = UIColor.white
         if tag == 1001 {
             UICollectionView.appearance().contentInset = UIEdgeInsets(top: kNavBarTotalHeight,left: 0,bottom: 0,right: 0)