南鑫林 před 5 roky
rodič
revize
1ec62f19e8
13 změnil soubory, kde provedl 49 přidání a 36 odebrání
  1. 1 1
      RainbowPlanet/Podfile
  2. 1 1
      RainbowPlanet/Podfile.lock
  3. 2 2
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  4. 0 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/ViewController/UserPersonalCenterViewController.swift
  5. 1 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/FilterAbout/AliyunEffectFilterView.m
  6. 1 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/Model/AlivcShortVideoUploadManager.m
  7. 3 2
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/ResourceManager/Manager/AliyunDBHelper.m
  8. 4 4
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCoverPick/Controller/AliyunCoverPickViewController.m
  9. 1 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCrop/Controller/AliyunCropViewController.m
  10. 7 2
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.m
  11. 22 20
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.m
  12. 4 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/Controller/PublishEditController.swift
  13. 2 2
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift

+ 1 - 1
RainbowPlanet/Podfile

@@ -1,6 +1,6 @@
 #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, '9.1'
+ platform :ios, '9.0'
 
 target 'RainbowPlanet' do
   # Comment the next line if you're not using Swift and don't want to use dynamic frameworks

+ 1 - 1
RainbowPlanet/Podfile.lock

@@ -250,6 +250,6 @@ SPEC CHECKSUMS:
   YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
   ZipArchive: e25a4373192673e3229ac8d6e9f64a3e5713c966
 
-PODFILE CHECKSUM: 3e7df9039ea1463b6287991998fd1bf590961a80
+PODFILE CHECKSUM: 810a7117534d7cc86fe6e12f6388571ac3b400f2
 
 COCOAPODS: 1.7.4

+ 2 - 2
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -6909,7 +6909,7 @@
 					"\"$(SRCROOT)/RainbowPlanet/Lib/AlipaySDK\"",
 				);
 				INFOPLIST_FILE = "$(SRCROOT)/RainbowPlanet/Supporting Files/Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 9.1;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
@@ -7160,7 +7160,7 @@
 					"\"$(SRCROOT)/RainbowPlanet/Lib/AlipaySDK\"",
 				);
 				INFOPLIST_FILE = "$(SRCROOT)/RainbowPlanet/Supporting Files/Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 9.1;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",

+ 0 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/ViewController/UserPersonalCenterViewController.swift

@@ -325,7 +325,6 @@ extension UserPersonalCenterViewController {
             self?.userHeaderView.userDetailModel = self?.userDetailModel
             self?.navigationBar.backgroundImageView.kf.setImage(with: kURLThumbnailsImage(name: self?.userDetailModel?.backgroundImg ?? "default_pic", size: (self?.navigationBar.backgroundImageView.size)!), placeholder: kImage(name: "default_pic"))
             self?.avatarButton.kf.setImage(with: kURLThumbnailsImage(name: self?.userDetailModel?.avatar ?? "", size: kSize60x60Image), for: UIControl.State.normal, placeholder: kImage(name: "default_avatar"))
-            KingfisherManager.shared.cache.clearMemoryCache()
             
         }
     }

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/FilterAbout/AliyunEffectFilterView.m

@@ -125,6 +125,7 @@
         }
         
         if (eType != AliyunEffectTypeSpecialFilter) {
+            
             dispatch_async(dispatch_get_main_queue(), ^{
                 [weakSelf.collectionView reloadData];
             });

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/Model/AlivcShortVideoUploadManager.m

@@ -205,7 +205,7 @@ static AliyunVodPublishManager *_uploadManager = nil;
         if (weakSelf.managerDelegate &&
             [weakSelf.managerDelegate respondsToSelector:@selector(uploadManager:
                                                            uploadStatusChangedTo:)]) {
-            [weakSelf.managerDelegate uploadManager:self
+            [weakSelf.managerDelegate uploadManager:weakSelf
                       uploadStatusChangedTo:AlivcUploadStatusFailure];
         }
     });

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 3 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/ResourceManager/Manager/AliyunDBHelper.m


+ 4 - 4
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCoverPick/Controller/AliyunCoverPickViewController.m

@@ -29,8 +29,8 @@
     __weak __typeof(self)weakSelf = self;
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
              ^{
-        __strong __typeof(weakSelf)strongSelf = weakSelf;
-        [strongSelf.pickView loadThumbnailData];
+         // __strong __typeof(weakSelf)strongSelf = weakSelf;
+        [weakSelf.pickView loadThumbnailData];
     });
 }
 
@@ -120,8 +120,8 @@
 - (void)pickViewDidUpdateImage:(UIImage *)image {
     __weak typeof(self) weakSelf = self;
   dispatch_async(dispatch_get_main_queue(), ^{
-      __strong __typeof(weakSelf)strongSelf = weakSelf;
-    strongSelf.coverView.image = image;
+       // __strong __typeof(weakSelf)strongSelf = weakSelf;
+    weakSelf.coverView.image = image;
   });
 }
 - (BOOL)shouldAutorotate {

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCrop/Controller/AliyunCropViewController.m

@@ -418,6 +418,7 @@ typedef NS_ENUM(NSInteger, AliyunCropPlayerStatus) {
     UIViewController *editVC = [[AlivcShortVideoRoute shared] alivcViewControllerWithType:AlivcViewControlEdit];
     __weak __typeof(self)weakSelf = self;
     dispatch_async(dispatch_get_main_queue(), ^{
+         // __strong __typeof(weakSelf)strongSelf = weakSelf;
         [weakSelf.navigationController pushViewController:editVC animated:YES];
     });
 }

+ 7 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.m

@@ -293,6 +293,9 @@ AliyunIExporterCallback, AliyunIPlayerCallback>
     self.progressView.progressColor = [UIColor colorWithHexString:@"#62CC74"];
     self.progressView.progressBackgroundColor = RGBToColor(160, 168, 183);
     [self.view addSubview:self.progressView];
+    
+    [self.view addSubview:self.musicView];
+    [self.musicView addVisualEffect];
 }
 
 // slider变动时改变播放进度
@@ -465,8 +468,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback>
 - (PublishMusicChooseView *)musicView {
     if (!_musicView) {
         _musicView = [[PublishMusicChooseView alloc] initWithFrame:CGRectMake(0, ScreenHeight, ScreenWidth, ScreenHeight - SafeTop - SafeBottom - 22)];
-        [self.view addSubview:_musicView];
-        [_musicView addVisualEffect];
     }
     return _musicView;
 }
@@ -791,6 +792,7 @@ AliyunIExporterCallback, AliyunIPlayerCallback>
         if (musicFilePath == nil) {
             [[SwiftProgressHUD shared] showText:@"音乐加载失败" textAlignment:(NSTextAlignmentLeft)];
         }else {
+             // __strong __typeof(weakSelf)strongSelf = weakSelf;
             AVURLAsset *asset = [AVURLAsset assetWithURL:[NSURL fileURLWithPath:musicFilePath]];
             CGFloat musicDuration = [asset avAssetVideoTrackDuration];
             
@@ -1216,6 +1218,7 @@ AliyunIExporterCallback, AliyunIPlayerCallback>
     __weak __typeof(self)weakSelf = self;
     [library writeVideoAtPathToSavedPhotosAlbum:[NSURL fileURLWithPath:_config.outputPath] completionBlock:^(NSURL *assetURL, NSError *error) {
          /* process assetURL */
+         // __strong __typeof(weakSelf)strongSelf = weakSelf;
          if (!error) {
              NSLog(@"视频已保存到相册");
              dispatch_async(dispatch_get_main_queue(), ^{
@@ -1313,6 +1316,8 @@ AliyunIExporterCallback, AliyunIPlayerCallback>
     }
     __weak __typeof(self)weakSelf = self;
     [UIView animateWithDuration:0.2 animations:^{
+         // __strong __typeof(weakSelf)strongSelf = weakSelf;
+
         weakSelf.musicView.frame = frame;
     }];
 }

+ 22 - 20
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.m

@@ -221,6 +221,8 @@
     
     [self.dbHelper openResourceDBSuccess:nil failure:nil];
     [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
+    
+
 }
 
 /**
@@ -232,6 +234,8 @@
     [self.view addSubview:self.magicCameraView];
     self.view.backgroundColor = _uiConfig.backgroundColor;
     [self.view addSubview:self.filterView];
+    [self.view addSubview:self.musicView];
+    [self.musicView addVisualEffect];
 }
 
 
@@ -524,7 +528,7 @@
         return [NSURL fileURLWithPath:path];
         
     } completionHandler:^(NSURLResponse * _Nonnull response, NSURL * _Nullable filePath, NSError * _Nullable error) {
-        __strong __typeof(weakSelf)strongSelf = weakSelf;  //3
+         // __strong __typeof(weakSelf)strongSelf = weakSelf;  //3
         // filePath就是你下载文件的位置,你可以解压,也可以直接拿来使用
         NSString *musicFilePath = [filePath path];// 将NSURL转成NSString
         // 应用音乐效果
@@ -534,7 +538,7 @@
         AliyunEffectMusic *effectMusic = [[AliyunEffectMusic alloc] initWithFile:musicFilePath];
         effectMusic.startTime = 0;
         effectMusic.duration = musicDuration;
-        [strongSelf.recorder applyMusic:effectMusic];
+        [weakSelf.recorder applyMusic:effectMusic];
     }];
     
     // 开始执行下载
@@ -587,9 +591,9 @@
     self.magicCameraView.userInteractionEnabled = YES;
     __weak __typeof(self)weakSelf = self;
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-        __strong __typeof(weakSelf)strongSelf = weakSelf;  //3
+         // __strong __typeof(weakSelf)strongSelf = weakSelf;  //3
         
-        [strongSelf startRetainCameraRotate];
+        [weakSelf startRetainCameraRotate];
      });
 }
 
@@ -770,8 +774,8 @@
 
     self.magicCameraView.rateView.hidden = false;
     [UIView animateWithDuration:0.2 animations:^{
-        __strong __typeof(weakSelf)strongSelf = weakSelf;
-        strongSelf.musicView.frame = frame;
+         // __strong __typeof(weakSelf)strongSelf = weakSelf;
+        weakSelf.musicView.frame = frame;
     }];
 }
 
@@ -793,8 +797,8 @@
     __weak __typeof(self)weakSelf = self;
     self.magicCameraView.rateView.hidden = false;
     [UIView animateWithDuration:0.2 animations:^{
-        __strong __typeof(weakSelf)strongSelf = weakSelf;  //3
-        strongSelf.filterView.frame = frame;
+         // __strong __typeof(weakSelf)strongSelf = weakSelf;  //3
+        weakSelf.filterView.frame = frame;
     }];
 }
 
@@ -836,23 +840,23 @@
         __weak typeof(self) weakSelf = self;
 
         [self.motionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue mainQueue] withHandler:^(CMDeviceMotion * _Nullable motion, NSError * _Nullable error) {
-            __strong __typeof(weakSelf)strongSelf = weakSelf;  //3
+             // __strong __typeof(weakSelf)strongSelf = weakSelf;  //3
             // Gravity 获取手机的重力值在各个方向上的分量,根据这个就可以获得手机的空间位置,倾斜角度等
             double gravityX = motion.gravity.x;
             double gravityY = motion.gravity.y;
             double xyTheta = atan2(gravityX,gravityY)/M_PI*180.0;//手机旋转角度。
             if (xyTheta >= -45 && xyTheta <= 45) {
                 //down
-                strongSelf.cameraRotate =180;
+                weakSelf.cameraRotate =180;
             } else if (xyTheta > 45 && xyTheta < 135) {
                 //left
-                strongSelf.cameraRotate = 90;
+                weakSelf.cameraRotate = 90;
             } else if ((xyTheta >= 135 && xyTheta < 180) || (xyTheta >= -180 && xyTheta < -135)) {
                 //up
-                strongSelf.cameraRotate = 0;
+                weakSelf.cameraRotate = 0;
             } else if (xyTheta >= -135 && xyTheta < -45) {
                 //right
-                strongSelf.cameraRotate = 270;
+                weakSelf.cameraRotate = 270;
             }
         }];
     }
@@ -863,10 +867,10 @@
     
     __weak __typeof(self)weakSelf = self;
     dispatch_async(dispatch_get_main_queue(), ^{
-        __strong __typeof(weakSelf)strongSelf = weakSelf;  //3
-//        CGFloat percent = duration / _clipManager.maxDuration;
-        [strongSelf.magicCameraView recordingPercent:duration];
-        strongSelf.recordingDuration = duration;
+         // __strong __typeof(weakSelf)strongSelf = weakSelf;  //3
+//        CGFloat percent = duration / weakSelf.clipManager.maxDuration;
+        [weakSelf.magicCameraView recordingPercent:duration];
+        weakSelf.recordingDuration = duration;
     });
 }
 
@@ -1057,7 +1061,7 @@
         _filterView = [[AliyunEffectFilterView alloc]
                        initWithFrame:CGRectMake(0, ScreenHeight, ScreenWidth, 180)];
         _filterView.delegate = (id<AliyunEffectFilter2ViewDelegate>)self;
-        [self.view addSubview:_filterView];
+//        [self.view addSubview:_filterView];
         [_filterView addVisualEffect];
     }
     return _filterView;
@@ -1067,8 +1071,6 @@
 - (PublishRecordMusicView *)musicView {
     if (!_musicView) {
         _musicView = [[PublishRecordMusicView alloc] initWithFrame:CGRectMake(0, ScreenHeight, ScreenWidth, ScreenHeight - SafeTop - SafeBottom - 22)];
-        [self.view addSubview:_musicView];
-        [_musicView addVisualEffect];
     }
     return _musicView;
 }

+ 4 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/Controller/PublishEditController.swift

@@ -19,6 +19,10 @@ enum PublishMediaType: Int {
 
 class PublishEditController: BaseViewController {
     
+    deinit {
+        NXLLog("deinit")
+    }
+    
     override func didReceiveMemoryWarning() {
         super.didReceiveMemoryWarning()
     }

+ 2 - 2
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift

@@ -10,8 +10,8 @@ import Foundation
 
 let kPersonalService = false
 let kDevelopSever = false
-let kBetaSever = true
-let kProductSever = false
+let kBetaSever = false
+let kProductSever = true
 
 // MARK: - 数据服务器
 public func kApiDataPrefix() -> String {