소스 검색

滤镜View - to be continued

Chris 5 년 전
부모
커밋
9dc05b9560

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

@@ -482,6 +482,7 @@
 		BD3AA45822AE63EC00EF4F20 /* MessageMainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD3AA45722AE63EC00EF4F20 /* MessageMainViewController.swift */; };
 		BD3AA45F22AE6F2500EF4F20 /* MessagePlanetTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD3AA45E22AE6F2500EF4F20 /* MessagePlanetTableCell.swift */; };
 		BD4B50AC22BC7DEA0073B516 /* FilterResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BD4B50AB22BC7DEA0073B516 /* FilterResource.bundle */; };
+		BD4B50AE22BC815F0073B516 /* PublishFilterCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD4B50AD22BC815F0073B516 /* PublishFilterCollectionCell.swift */; };
 		BD6EDF48229007EA009A20FE /* OrderApplyRefundModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD6EDF47229007EA009A20FE /* OrderApplyRefundModel.swift */; };
 		BD7AB83622841A8B0030646A /* ShoppingCartPayOrderItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB83522841A8B0030646A /* ShoppingCartPayOrderItemCell.swift */; };
 		BD7AB838228420310030646A /* ShoppingCartPayOrderHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB837228420310030646A /* ShoppingCartPayOrderHeader.swift */; };
@@ -1050,6 +1051,7 @@
 		BD3AA45722AE63EC00EF4F20 /* MessageMainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageMainViewController.swift; sourceTree = "<group>"; };
 		BD3AA45E22AE6F2500EF4F20 /* MessagePlanetTableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagePlanetTableCell.swift; sourceTree = "<group>"; };
 		BD4B50AB22BC7DEA0073B516 /* FilterResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = FilterResource.bundle; sourceTree = "<group>"; };
+		BD4B50AD22BC815F0073B516 /* PublishFilterCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishFilterCollectionCell.swift; sourceTree = "<group>"; };
 		BD6EDF47229007EA009A20FE /* OrderApplyRefundModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundModel.swift; sourceTree = "<group>"; };
 		BD7AB83522841A8B0030646A /* ShoppingCartPayOrderItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartPayOrderItemCell.swift; sourceTree = "<group>"; };
 		BD7AB837228420310030646A /* ShoppingCartPayOrderHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartPayOrderHeader.swift; sourceTree = "<group>"; };
@@ -3451,15 +3453,6 @@
 			path = ViewController;
 			sourceTree = "<group>";
 		};
-		A7D5F24822BC64B600F8E9AF /* AliyunVideoSDK */ = {
-			isa = PBXGroup;
-			children = (
-				BD01B1F522BC670A00CE9F36 /* FilterResource.bundle */,
-			);
-			name = AliyunVideoSDK;
-			path = ../../../../../../Desktop/AliyunVideoSDK;
-			sourceTree = "<group>";
-		};
 		A7D5F24B22BC71ED00F8E9AF /* WVJB */ = {
 			isa = PBXGroup;
 			children = (
@@ -3802,6 +3795,7 @@
 				BD01B1FD22BC677900CE9F36 /* PublishVideoRecorderController.swift */,
 				BD01B1FF22BC677900CE9F36 /* PublishVideoView.swift */,
 				BD01B1FE22BC677900CE9F36 /* PublishFilterView.swift */,
+				BD4B50AD22BC815F0073B516 /* PublishFilterCollectionCell.swift */,
 			);
 			path = PublishTakeVideo;
 			sourceTree = "<group>";
@@ -4549,7 +4543,6 @@
 				BD108C9B22A60C3300837DAB /* HGImage.storyboard in Resources */,
 				A7FF1577228C824300A85748 /* OrderModule.xcassets in Resources */,
 				BD4B50AC22BC7DEA0073B516 /* FilterResource.bundle in Resources */,
-				A7D5F22F22BB93C100F8E9AF /* ExampleApp.html in Resources */,
 				A7931E0822AF855E00297D0A /* RegisterLoginModule.xcassets in Resources */,
 				A7778C9922438F5D00C7C47A /* README.txt in Resources */,
 				A7BF202722B3930100396DB3 /* MessageModule.xcassets in Resources */,
@@ -4917,6 +4910,7 @@
 				A71738AD228AB7B2000AEA6A /* ProductCommentListModel.swift in Sources */,
 				A7C0FDF822B6671C00BC1E86 /* PopularVideoCollectionViewCell.swift in Sources */,
 				A7E19FA822BA2CDF009BCCE1 /* SearchProductListViewController.swift in Sources */,
+				BD4B50AE22BC815F0073B516 /* PublishFilterCollectionCell.swift in Sources */,
 				BD929CCA22B8CFB10098C139 /* AliyunPathManager.m in Sources */,
 				A7D5F23322BB9BE600F8E9AF /* CommunityMyInvitationViewController.swift in Sources */,
 				BD13B6C522BA034D008BB323 /* PublishEditAddAddressCell.swift in Sources */,

+ 81 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/PublishFilterCollectionCell.swift

@@ -0,0 +1,81 @@
+//
+//  PublishFilterCollectionCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/6/21.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import RxSwift
+
+class PublishFilterCollectionCell: UICollectionViewCell {
+    
+    let disposeBag = DisposeBag()
+    
+    var titleStr: String? {
+        didSet {
+            titleLabel.text = titleStr
+        }
+    }
+    
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> PublishFilterCollectionCell {
+        let ID = "PublishFilterCollectionCell.swift"
+        collectionView.register(PublishFilterCollectionCell.self, forCellWithReuseIdentifier: ID)
+        let cell : PublishFilterCollectionCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! PublishFilterCollectionCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        addSubview(typeImageView)
+        addSubview(titleLabel)
+    }
+    
+    private func setupLayouts() {
+        typeImageView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview()
+            make.centerX.equalToSuperview()
+            make.size.equalTo(52)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(typeImageView.snp_bottom).offset(12)
+            make.left.equalTo(typeImageView.snp_left)
+            make.right.equalTo(typeImageView.snp_right)
+            make.height.equalTo(16)
+        }
+    }
+    
+    private lazy var typeImageView: UIImageView = {
+        let typeImageView = UIImageView()
+        return typeImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = kffffffColor
+        titleLabel.font = kRegularFont12
+        titleLabel.textAlignment = .center
+        titleLabel.numberOfLines = 1
+        return titleLabel
+    }()
+    
+}

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/PublishFilterView.swift

@@ -50,7 +50,7 @@ class PublishFilterView: BaseView {
     
     private lazy var titleLabel: UILabel = {
         let titleLabel = UILabel()
-        titleLabel.backgroundColor = kRGBAColor(r: 0/255.0, g: 0/255.0, b: 0/255.0, a: 0.2)
+        titleLabel.backgroundColor = kRGBAColor(r: 0/255.0, g: 0/255.0, b: 0/255.0, a: 0.5)
         titleLabel.text = "滤镜"
         titleLabel.textColor = kffffffColor
         titleLabel.font = kRegularFont16
@@ -87,7 +87,7 @@ extension PublishFilterView: UICollectionViewDelegateFlowLayout,UICollectionView
     }
     
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
-        let cell = PublishSelTopicCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        let cell = PublishFilterCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
         return cell
     }
     

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/PublishVideoRecorderController.swift

@@ -140,6 +140,7 @@ class PublishVideoRecorderController: BaseViewController {
     
     lazy var filterView: PublishFilterView = {
         let filterView = PublishFilterView()
+        
         filterView.dimClickClosure = {
             [weak self] in
             self?.filterView.isHidden = true