瀏覽代碼

no message

南鑫林 5 年之前
父節點
當前提交
aa06b5901c

+ 4 - 0
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -269,6 +269,7 @@
 		A7824B042271F10300ABA381 /* EditSelfMentionContactsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7824B032271F10300ABA381 /* EditSelfMentionContactsView.swift */; };
 		A7824B062271F25400ABA381 /* EditAddressTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7824B052271F25400ABA381 /* EditAddressTableViewCell.swift */; };
 		A7824B082271F53A00ABA381 /* EditSetDefaultTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7824B072271F53A00ABA381 /* EditSetDefaultTableViewCell.swift */; };
+		A78CEE0A22E0864100C512A4 /* BaseLottieAnimateContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A78CEE0922E0864100C512A4 /* BaseLottieAnimateContentView.swift */; };
 		A79057022276C9770037F823 /* SetPasswordModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A79057012276C9770037F823 /* SetPasswordModel.swift */; };
 		A79057062276EA3D0037F823 /* OpenCityListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A79057052276EA3D0037F823 /* OpenCityListModel.swift */; };
 		A790705B22B9B680008CE279 /* ModifyDataViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A790705A22B9B680008CE279 /* ModifyDataViewController.swift */; };
@@ -985,6 +986,7 @@
 		A7824B032271F10300ABA381 /* EditSelfMentionContactsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditSelfMentionContactsView.swift; sourceTree = "<group>"; };
 		A7824B052271F25400ABA381 /* EditAddressTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditAddressTableViewCell.swift; sourceTree = "<group>"; };
 		A7824B072271F53A00ABA381 /* EditSetDefaultTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditSetDefaultTableViewCell.swift; sourceTree = "<group>"; };
+		A78CEE0922E0864100C512A4 /* BaseLottieAnimateContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseLottieAnimateContentView.swift; sourceTree = "<group>"; };
 		A79057012276C9770037F823 /* SetPasswordModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SetPasswordModel.swift; sourceTree = "<group>"; };
 		A79057052276EA3D0037F823 /* OpenCityListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenCityListModel.swift; sourceTree = "<group>"; };
 		A790705A22B9B680008CE279 /* ModifyDataViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModifyDataViewController.swift; sourceTree = "<group>"; };
@@ -3146,6 +3148,7 @@
 			isa = PBXGroup;
 			children = (
 				A77F2CC9223209F2001BD3F6 /* BaseTabbarViewController.swift */,
+				A78CEE0922E0864100C512A4 /* BaseLottieAnimateContentView.swift */,
 			);
 			path = BaseTabbarViewController;
 			sourceTree = "<group>";
@@ -6127,6 +6130,7 @@
 				BD13B6E222BA03BC008BB323 /* PublishTopicTypeCell.swift in Sources */,
 				BDE376D822C22A260055E2EA /* NSString+AlivcHelper.m in Sources */,
 				A72A726822321DBD00B21995 /* UMManager.swift in Sources */,
+				A78CEE0A22E0864100C512A4 /* BaseLottieAnimateContentView.swift in Sources */,
 				A70B2C042283D06B00B2449F /* ProductFloorFullLeftHeaderCollectionReusableView.swift in Sources */,
 				BD108C9322A60C2100837DAB /* HGImageCompleteButton.swift in Sources */,
 				A7B4E721228151F40012914A /* ProductFloorTitleView.swift in Sources */,

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

@@ -62,7 +62,6 @@ extension AppDelegate {
     func setTabbarController() {
         let tabbarViewController = BaseTabbarViewController.shared
         self.window?.rootViewController = tabbarViewController
-        tabbarViewController.addBadge()
     }
 
     /// 设置Login

+ 37 - 0
RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseLottieAnimateContentView.swift

@@ -0,0 +1,37 @@
+//
+//  BaseLottieAnimateContentView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/7/18.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import ESTabBarController_swift
+import Lottie
+
+class ExampleLottieAnimateBasicContentView: ESTabBarItemContentView {
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        textColor = k333333Color
+        highlightTextColor = k666666Color
+        iconColor = k333333Color
+        highlightIconColor = k666666Color
+    }
+    
+    public required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+}
+
+class BaseLottieAnimateContentView: ExampleLottieAnimateBasicContentView {
+    
+//    lazy var animationView: AnimationView = {
+//        let animationView = AnimationView()
+//        animationView.frame = CGRect(x: 0, y: 0, width: 24, height: 24)
+//        return animationView
+//    }()
+
+}

+ 46 - 1
RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabbarViewController.swift

@@ -7,7 +7,7 @@
 //
 
 import UIKit
-
+/*
 class BaseTabbarViewController: UITabBarController {
     
     static let shared : BaseTabbarViewController = BaseTabbarViewController()
@@ -131,3 +131,48 @@ extension BaseTabbarViewController : UITabBarControllerDelegate {
         
     }
 }
+
+*/
+
+import ESTabBarController_swift
+
+class BaseTabbarViewController : ESTabBarController {
+    
+    static let shared : BaseTabbarViewController = BaseTabbarViewController()
+    
+    var lastClickTag : Int?
+    
+    /// 社区
+    let v1 = CommunityViewController()
+    /// 商城
+    let v2 = ShoppingMallViewController()
+    /// 兑换专区
+    //    let v2 = RedemptionAreaViewController()
+    /// 发布
+    let v3 = BaseViewController()
+    /// 消息
+    let v4 = MessageMainViewController()
+    /// 我的
+    let v5 = UserPersonalCenterViewController()
+
+    override func viewDidLoad() {
+        
+        self.tabBar.shadowImage = UIImage(named: "tab_top_line")
+
+        v1.tabBarItem = ESTabBarItem.init(BaseLottieAnimateContentView(), title: "社区", image: UIImage(named: "tabbar_home"), selectedImage: UIImage(named: "tabbar_home_pre"))
+        v2.tabBarItem = ESTabBarItem.init(BaseLottieAnimateContentView(), title: "商城", image: UIImage(named: "tabbar_shopping"), selectedImage: UIImage(named: "tabbar_shopping_pre"))
+        v3.tabBarItem = ESTabBarItem.init(BaseLottieAnimateContentView(), title: nil, image: UIImage(named: "tabbar_publish"), selectedImage: UIImage(named: "tabbar_publish"))
+        v4.tabBarItem = ESTabBarItem.init(BaseLottieAnimateContentView(), title: "消息", image: UIImage(named: "tabbar_massage"), selectedImage: UIImage(named: "tabbar_massage_pre"))
+        v5.tabBarItem = ESTabBarItem.init(BaseLottieAnimateContentView(), title: "我的", image: UIImage(named: "tabbar_my"), selectedImage: UIImage(named: "tabbar_my_pre"))
+        
+        addNavigationVC(vc: v1)
+        addNavigationVC(vc: v2)
+        addNavigationVC(vc: v3)
+        addNavigationVC(vc: v1)
+        addNavigationVC(vc: v5)
+    }
+    
+    func addNavigationVC(vc:UIViewController) {
+        self.addChild(BaseNavigationViewController.init(rootViewController: vc))
+    }
+}

+ 0 - 6
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tabbar_massage_pre/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 6
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tabbar_my_pre/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 6
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tabbar_shopping_pre/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}