Kaynağa Gözat

Merge branch 'feature/dev_Chris' into develop

Chris 5 yıl önce
ebeveyn
işleme
d0e9e76e95
14 değiştirilmiş dosya ile 191 ekleme ve 145 silme
  1. 1 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/UIConfig/AlivcEditUIConfig.m
  2. 0 5
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/UIConfig/AlivcRecordUIConfig.h
  3. 1 2
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/UIConfig/AlivcRecordUIConfig.m
  4. 8 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCrop/Controller/AliyunCropViewController.m
  5. 0 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.h
  6. 80 55
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.m
  7. 3 2
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/AliyunEditButtonsView.m
  8. 3 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.h
  9. 5 6
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.m
  10. 3 3
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/View/AliyunMagicCameraView.h
  11. 65 69
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/View/AliyunMagicCameraView.m
  12. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/video_ico_speed.imageset/Contents.json
  13. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/video_ico_speed.imageset/video_ico_speed@2x.png
  14. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/video_ico_speed.imageset/video_ico_speed@3x.png

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/UIConfig/AlivcEditUIConfig.m

@@ -26,7 +26,7 @@
 
     _filterImage = [UIImage imageNamed:@"video_ico_filter"];
     
-    _musicImage = [AlivcImage imageNamed:@"alivc_svEdit_music"];
+    _musicImage = [UIImage imageNamed:@"video_ico_music"];
     _pasterImage = [AlivcImage imageNamed:@"alivc_svEdit_paster"];
     _captionImage = [AlivcImage imageNamed:@"alivc_svEdit_subtitle"];
     _mvImage = [AlivcImage imageNamed:@"alivc_svEdit_mv"];

+ 0 - 5
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/UIConfig/AlivcRecordUIConfig.h

@@ -25,11 +25,6 @@
  */
 @property (strong, nonatomic) UIImage *switchCameraImage;
 
-/**
- 完成的按钮图片 - 不可用
- */
-@property (strong, nonatomic) UIImage *finishImageUnable;
-
 /**
  完成的按钮图片 - 可用
  */

+ 1 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/UIConfig/AlivcRecordUIConfig.m

@@ -26,8 +26,7 @@
     
     _switchCameraImage = [UIImage imageNamed:@"video_ico_overturn"];
     _musicImage  = [UIImage imageNamed:@"video_ico_music"];
-    _filterImage = [UIImage imageNamed:@"video_ico_filter"];
-    _finishImageUnable = [AlivcImage imageNamed:@"shortVideo_finishButtonDisabled"];
+    _filterImage = [UIImage imageNamed:@"video_ico_filter"];    
     _finishImageEnable = [AlivcImage imageNamed:@"shortVideo_finishButtonNormal"];
     
     _videoShootImageNormal = [UIImage imageNamed:@"video_btn_shoot"];

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

@@ -103,6 +103,12 @@ typedef NS_ENUM(NSInteger, AliyunCropPlayerStatus) {
         self.navigationController.interactivePopGestureRecognizer.enabled = NO;
     }
 }
+
+//- (BOOL)prefersStatusBarHidden
+//{
+//    return YES;
+//}
+
 // 支持设备自动旋转
 - (BOOL)shouldAutorotate
 {
@@ -122,7 +128,8 @@ typedef NS_ENUM(NSInteger, AliyunCropPlayerStatus) {
     self.previewScrollView = [[UIScrollView alloc] init];
     self.previewScrollView.bounces = NO;
     
-    self.previewScrollView.frame = CGRectMake(0, SafeTop+44, ScreenWidth, SizeHeight(426));
+//    self.previewScrollView.frame = CGRectMake(0, SafeTop+44, ScreenWidth, SizeHeight(426));
+    self.previewScrollView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
     self.previewScrollView.backgroundColor = _cutInfo.backgroundColor ? :[UIColor blackColor];
     self.previewScrollView.delegate = self;
     [self.view addSubview:self.previewScrollView];

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.h


+ 80 - 55
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.m

@@ -38,7 +38,6 @@
 #import "AliyunTimelineView.h"
 
 #import "AliyunCoverPickViewController.h"
-#import "AliyunEditButtonsView.h"
 #import "AliyunPublishService.h"
 
 //其它
@@ -75,7 +74,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
 
 @property(nonatomic, strong) UIView *movieView;
 @property(nonatomic, strong) AliyunTimelineView *currentTimelineView;
-@property(nonatomic, strong) AliyunEditButtonsView *editButtonsView;
 @property(nonatomic, strong) UIButton *backgroundTouchButton;
 @property(nonatomic, strong) UILabel *currentTimeLabel;
 @property(nonatomic, strong) UIButton *playButton;
@@ -137,6 +135,10 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
 
 @property(nonatomic, strong) UIButton *publishButton; //发布按钮
 
+@property(nonatomic, strong) UIButton *musicButton;  //音乐按钮
+@property(nonatomic, strong) UIButton *filterButton; //滤镜按钮
+@property(nonatomic, strong) UIButton *speedButton;  //调速按钮
+
 @property(nonatomic, assign) AlivcEditVCStatus vcStatus;  //界面状态
 @property(nonatomic, strong) AliyunMusicPickModel *music; //之前应用的音乐
 @property(nonatomic, assign) NSInteger tab; //之前应用的音乐的所属
@@ -263,9 +265,14 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
     
     //发布按钮
     [self.view addSubview:self.publishButton];
-    
     self.publishButton.frame  =  CGRectMake(ScreenWidth - 14 - 64, SafeTop + 8, 64, 26);
     
+    [self.view addSubview:self.musicButton];
+    [self.view addSubview:self.filterButton];
+    [self.view addSubview:self.speedButton];
+    
+    
+    
     self.currentTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake((ScreenWidth-60)/2, IS_IPHONEX?(SafeTop-10):0, 60, 12)];
     self.currentTimeLabel.backgroundColor = RGBToColor(27, 33, 51);
     self.currentTimeLabel.textColor = [UIColor whiteColor];
@@ -274,12 +281,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
     self.currentTimeLabel.center = CGPointMake(ScreenWidth / 2,self.currentTimelineView.frame.origin.y + CGRectGetHeight(self.currentTimelineView.bounds) + 6);
     [self.view addSubview:self.currentTimeLabel];
     
-    NSArray *editModels = [AlivcEditItemManager defaultModelsWithUIConfig:_uiConfig];
-    self.editButtonsView = [[AliyunEditButtonsView alloc] initWithModels:editModels];
-    self.editButtonsView.frame =
-    CGRectMake(0, ScreenHeight - 70 - SafeBottom, ScreenWidth, 70);
-    [self.view addSubview:self.editButtonsView];
-    self.editButtonsView.delegate = (id)self;
     [self.view addSubview:self.playButton];
 }
 
@@ -548,6 +549,74 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
     return _publishButton;
 }
 
+- (UIButton *)musicButton{
+    if (!_musicButton) {
+        _musicButton = [UIButton buttonWithType:UIButtonTypeCustom];
+        _musicButton.backgroundColor = [UIColor clearColor];
+        _musicButton.frame  =  CGRectMake(ScreenWidth - 44 - 10, SafeTop + 64, 44, 46);
+        [_musicButton setImage:_uiConfig.musicImage forState:UIControlStateNormal];
+        [_musicButton addTarget:self action:@selector(musicButtonClicked) forControlEvents:UIControlEventTouchUpInside];
+        [_musicButton setTitle:@"音乐" forState:UIControlStateNormal];
+        _musicButton.titleLabel.font = [UIFont systemFontOfSize:12];
+        CGFloat titleHeight = _musicButton.titleLabel.intrinsicContentSize.height;
+        CGFloat imageWidth = _musicButton.imageView.frame.size.width;
+        CGFloat imageHeight = _musicButton.imageView.frame.size.height;
+        
+        _musicButton.imageEdgeInsets = UIEdgeInsetsMake(0, (44 - imageWidth) * 0.5, titleHeight + 4, 0);
+        _musicButton.titleEdgeInsets = UIEdgeInsetsMake(imageHeight + 4, -imageWidth, 0, 0);
+        
+        _musicButton.layer.shadowColor = [UIColor grayColor].CGColor;
+        _musicButton.layer.shadowOpacity = 0.5;
+        _musicButton.layer.shadowOffset = CGSizeMake(1, 1);
+    }
+    return _musicButton;
+}
+
+- (UIButton *)filterButton{
+    if (!_filterButton) {
+        _filterButton = [UIButton buttonWithType:UIButtonTypeCustom];
+        _filterButton.backgroundColor = [UIColor clearColor];
+        _filterButton.frame  =  CGRectMake(ScreenWidth - 44 - 10, SafeTop + 130, 44, 46);
+        [_filterButton setImage:_uiConfig.filterImage forState:UIControlStateNormal];
+        [_filterButton addTarget:self action:@selector(filterButtonClicked) forControlEvents:UIControlEventTouchUpInside];
+        [_filterButton setTitle:@"滤镜" forState:UIControlStateNormal];
+        _filterButton.titleLabel.font = [UIFont systemFontOfSize:12];
+        CGFloat titleHeight = _filterButton.titleLabel.intrinsicContentSize.height;
+        CGFloat imageWidth = _filterButton.imageView.frame.size.width;
+        CGFloat imageHeight = _filterButton.imageView.frame.size.height;
+        _filterButton.imageEdgeInsets = UIEdgeInsetsMake(0, (44 - imageWidth) * 0.5, titleHeight + 4, 0);
+        _filterButton.titleEdgeInsets = UIEdgeInsetsMake(imageHeight + 4, -imageWidth, 0, 0);
+        
+        _filterButton.layer.shadowColor = [UIColor grayColor].CGColor;
+        _filterButton.layer.shadowOpacity = 0.5;
+        _filterButton.layer.shadowOffset = CGSizeMake(1, 1);
+    }
+    return _filterButton;
+}
+
+- (UIButton *)speedButton{
+    if (!_speedButton) {
+        _speedButton = [UIButton buttonWithType:UIButtonTypeCustom];
+        _speedButton.backgroundColor = [UIColor clearColor];
+        _speedButton.frame  =  CGRectMake(ScreenWidth - 44 - 10, SafeTop + 196, 44, 46);
+        [_speedButton setImage:[UIImage imageNamed:@"video_ico_overturn"] forState:UIControlStateNormal];
+        [_speedButton addTarget:self action:@selector(timeButtonClicked) forControlEvents:UIControlEventTouchUpInside];
+        [_speedButton setTitle:@"调速" forState:UIControlStateNormal];
+        _speedButton.titleLabel.font = [UIFont systemFontOfSize:12];
+        CGFloat titleHeight = _speedButton.titleLabel.intrinsicContentSize.height;
+        CGFloat imageWidth = _speedButton.imageView.frame.size.width;
+        CGFloat imageHeight = _speedButton.imageView.frame.size.height;
+        
+        _speedButton.imageEdgeInsets = UIEdgeInsetsMake(0, (44 - imageWidth) * 0.5, titleHeight + 4, 0);
+        _speedButton.titleEdgeInsets = UIEdgeInsetsMake(imageHeight + 4, -imageWidth, 0, 0);
+        
+        _speedButton.layer.shadowColor = [UIColor grayColor].CGColor;
+        _speedButton.layer.shadowOpacity = 0.5;
+        _speedButton.layer.shadowOffset = CGSizeMake(1, 1);
+    }
+    return _speedButton;
+}
+
 #pragma mark - ButtonAction
 
 - (void)playControlClick:(UIButton *)sender {
@@ -791,7 +860,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
  */
 - (void)enterEditWithActionType:(AliyunEditSouceClickType)type
             animationCompletion:(void (^__nullable)(BOOL finished))completion {
-    self.editButtonsView.userInteractionEnabled = NO;
     NSLog(@"多点测试:%lu", (unsigned long)type);
     NSLog(@"多点测试:底部按钮失效");
     _editSouceClickType = type;
@@ -961,7 +1029,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
                          view.frame = f;
                      } completion:^(BOOL finished) {
                          if (finished) {
-                             self.editButtonsView.userInteractionEnabled = YES;
                              NSLog(@"多点测试:底部按钮可以点击");
                          }
                      }];
@@ -1335,12 +1402,11 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
     //    NSLog(@"timelineEditDraggingAtTime");
 }
 
-#pragma mark - 底部视图响应以及各视图代理
 
-#pragma mark - AliyunEditButtonsViewDelegate - 底部容器视图
 
+#pragma mark -
 //滤镜
-- (void)filterButtonClicked:(AliyunEditMaterialType)type {
+- (void)filterButtonClicked {
     [self enterEditWithActionType:AliyunEditSouceClickTypeFilter animationCompletion:nil];
     
     if (!self.hasUesedintelligentFilter) {
@@ -1387,16 +1453,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
     [self enterEditWithActionType:AliyunEditSouceClickTypeTimeFilter animationCompletion:nil];
 }
 
-//封面选择
-- (void)coverButtonClicked {
-    self.playButton.hidden = YES;
-    self.currentTimelineView = self.coverSelectedView.timelineView;
-    [self enterEditWithActionType:AliyunEditSouceClickTypeCover
-              animationCompletion:^(BOOL finished){
-                  
-              }];
-}
-
 #pragma mark - AliyunEffectFilter2ViewDelegate - 滤镜
 
 - (void)didSelectEffectFilter:(AliyunEffectFilterInfo *)filter {
@@ -1550,35 +1606,4 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
     NSLog(@"----点击了-倒放");
 }
 
-#pragma mark - AlivcCoverImageSelectedViewDelegate - 封面
-- (void)cancelCoverImageSelectedView:(AlivcCoverImageSelectedView *)view {
-    [self quitEditWithActionType:_editSouceClickType CompletionHandle:^(BOOL finished) {
-        self.playButton.hidden = NO;
-    }];
-}
-
-- (void)applyCoverImageSelectedView:(AlivcCoverImageSelectedView *)view {
-    //时间
-    //    CGFloat time = [self.player getCurrentStreamTime];
-    //截图
-    _coverImage = [self screenShotView:self.movieView];
-    NSLog(@"图片宽度%.2f,高度%.2f",_coverImage.size.width,_coverImage.size.height);
-    NSLog(@"视图宽度%.2f,高度%.2f",self.movieView.frame.size.width,self.movieView.frame.size.height);
-    [self quitEditWithActionType:_editSouceClickType CompletionHandle:^(BOOL finished) {
-        self.playButton.hidden = NO;
-    }];
-    
-}
-
-//传入需要截取的view
-- (UIImage *)screenShotView:(UIView *)view {
-    NSLog(@"-------->view.frame:%@",NSStringFromCGRect(view.frame));
-    UIGraphicsBeginImageContextWithOptions(view.frame.size, NO,0);
-    [view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];
-    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
-    
-    UIGraphicsEndImageContext();
-    return image;
-}
-
 @end

+ 3 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/AliyunEditButtonsView.m

@@ -30,8 +30,9 @@
     //2个按钮中心之间的间距
     CGFloat devide = ScreenWidth / 5.5;
     //基础参数
-    UIImage *image = firstModel.showImage;
-    CGFloat buttonWidth = image.size.width;
+//    UIImage *image = firstModel.showImage;
+//    CGFloat buttonWidth = image.size.width;
+    CGFloat buttonWidth = 40;
     CGFloat labelHeight = 30;
     CGFloat buttonHeight = buttonWidth + labelHeight;
 

+ 3 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.h

@@ -34,5 +34,8 @@
 // 跳转至编辑block
 @property (nonatomic, copy, nullable) void (^editBlock)(void);
 
+// 
+@property (nonatomic, copy, nullable) void (^hideSegmentBlock)(void);
+
 @end
 

+ 5 - 6
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.m

@@ -314,7 +314,7 @@
 - (void)updateUIWithVideoSize:(CGSize)videoSize {
     CGFloat r = videoSize.width / videoSize.height;
     BOOL is_W9_H16 = (r - 9/16.0)<0.01; //是否是9:16的比例
-    CGFloat y =  CGRectGetMaxY(self.magicCameraView.topView.frame);
+    CGFloat y =  CGRectGetMaxY(self.magicCameraView.selBackView.frame);
     CGRect preFrame = CGRectMake(0, y, ScreenWidth, ScreenWidth / r);
     
     if (_belowiPhone4s && is_W9_H16) {
@@ -333,11 +333,11 @@
     y = CGRectGetMaxY(_magicCameraView.previewView.frame);
     if (_belowiPhone4s) {
             _magicCameraView.bottomView.frame = CGRectMake(0, y, ScreenWidth, ScreenHeight - y);
-            self.magicCameraView.topView.backgroundColor = [AlivcUIConfig shared].kAVCBackgroundColor;
+            self.magicCameraView.selBackView.backgroundColor = [AlivcUIConfig shared].kAVCBackgroundColor;
  
     } else {
         if (!is_W9_H16) {
-                self.magicCameraView.topView.backgroundColor = [AlivcUIConfig shared].kAVCBackgroundColor;
+                self.magicCameraView.selBackView.backgroundColor = [AlivcUIConfig shared].kAVCBackgroundColor;
 //
             _magicCameraView.bottomView.frame = CGRectMake(0, y, ScreenWidth, ScreenHeight - y);
 
@@ -345,7 +345,7 @@
 
             _magicCameraView.bottomView.frame = CGRectMake(0, ScreenHeight, 0, 0);
         
-            self.magicCameraView.topView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.01];
+            self.magicCameraView.selBackView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.01];
 
         }
     }
@@ -686,7 +686,6 @@
     NSLog(@"---------->点击了录制按钮");
     self.downTime = CFAbsoluteTimeGetCurrent();
     self.downVideoCount = [_clipManager partCount];
-     NSLog(@"开始拍摄:动图测试");
     if (_clipManager.partCount<=0) { 
         _recorder.cameraRotate = self.cameraRotate;
         _quVideo.videoRotate = _recorder.cameraRotate;
@@ -729,7 +728,7 @@
     }
 }
 
-- (void)cameraIdButtonClicked {
+- (void)reverseButtonClicked {
     if (self.magicCameraView.backButton.enabled == NO) {
         return;
     }

+ 3 - 3
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/View/AliyunMagicCameraView.h

@@ -22,7 +22,7 @@
 /**
  前后摄像头切换按钮被点击的代理方法
  */
-- (void)cameraIdButtonClicked;
+- (void)reverseButtonClicked;
 
 /**
  音乐按钮被点击的代理方法
@@ -132,9 +132,9 @@
 @property (nonatomic, strong) AliyunRateSelectView *rateView;
 
 /**
- 顶部view
+ 放置"回删、确定"のView
  */
-@property (nonatomic, strong) UIView *topView;
+@property (nonatomic, strong) UIView *selBackView;
 
 /**
  底部view

+ 65 - 69
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/View/AliyunMagicCameraView.m

@@ -24,7 +24,7 @@
 /**
  前后摄像头切换按钮
  */
-@property (nonatomic, strong) UIButton *cameraIdButton;
+@property (nonatomic, strong) UIButton *reverseButton;
 
 /**
  时间显示控件
@@ -46,9 +46,9 @@
  */
 @property (nonatomic, strong) AlivcRecordUIConfig *uiConfig;
 
-@property (nonatomic, strong)AlivcRecordFocusView *focusView;
+@property (nonatomic, strong) AlivcRecordFocusView *focusView;
 
-@property (nonatomic, assign)CFTimeInterval cameraIdButtonClickTime;
+@property (nonatomic, assign) CFTimeInterval reverseButtonClickTime;
 
 @property (nonatomic, strong) UIImageView *coverImageView;
 
@@ -80,16 +80,16 @@
  */
 - (void)setupSubview
 {
-    _cameraIdButtonClickTime =CFAbsoluteTimeGetCurrent();
+    _reverseButtonClickTime =CFAbsoluteTimeGetCurrent();
     if(!_uiConfig){
         _uiConfig = [[AlivcRecordUIConfig alloc]init];
     }
-    self.topView = [[UIView alloc] initWithFrame:CGRectMake(0,(IPHONEX ? 44 + 14 : 14), CGRectGetWidth(self.bounds), 44+8)];
-    [self addSubview:self.topView];
+    self.selBackView = [[UIView alloc] initWithFrame:CGRectMake(0,(IPHONEX ? 44 + 14 : 14), CGRectGetWidth(self.bounds), 44+8)];
+    [self addSubview:self.selBackView];
     
     [self addSubview:self.backButton];
-    [self.topView addSubview:self.finishButton];
-    [self addSubview:self.cameraIdButton];
+    [self.selBackView addSubview:self.finishButton];
+    [self addSubview:self.reverseButton];
     [self addSubview:self.musicButton];
     [self addSubview:self.filterButton];
     [self insertSubview:self.previewView atIndex:0];
@@ -98,8 +98,6 @@
     self.bottomView.backgroundColor = [AlivcUIConfig shared].kAVCBackgroundColor;
     [self addSubview:self.bottomView];
     
-    self.topView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.01];
-    
     
     self.deleteButton = [[UIButton alloc] initWithFrame:CGRectMake(ScreenWidth/2-40, ScreenHeight-42 - SafeBottom, 70, 40)];
     self.deleteButton.hidden = YES;
@@ -151,7 +149,7 @@
     [self.filterButton setExclusiveTouch:YES];
     [self.deleteButton setExclusiveTouch:YES];
     [self.finishButton setExclusiveTouch:YES];
-    [self.cameraIdButton setExclusiveTouch:YES];
+    [self.reverseButton setExclusiveTouch:YES];
 }
 
 - (void)recordButtonTouchUp {
@@ -247,11 +245,12 @@
 
 - (void)setHide:(BOOL)hide {
     self.deleteButton.hidden = hide;
-    self.topView.hidden = hide;
     self.rateView.hidden = hide;
+    
+    self.reverseButton.hidden = hide;
     self.musicButton.hidden = hide;
     self.filterButton.hidden = hide;
-    
+    self.selBackView.hidden = hide;
 }
 
 - (void)setBottomHide:(BOOL)hide{
@@ -284,6 +283,18 @@
 }
 
 #pragma mark - Getter -
+- (QUProgressView *)progressView {
+    if (!_progressView) {
+        _progressView = [[QUProgressView alloc] initWithFrame:CGRectMake(14, SafeTop + 20, CGRectGetWidth(self.bounds) - 28, 5)];
+        _progressView.showBlink = NO;
+        _progressView.showNoticePoint = YES;
+        _progressView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.01];
+        _progressView.layer.cornerRadius = 3;
+        _progressView.layer.masksToBounds = YES;
+    }
+    return _progressView;
+}
+
 - (UIButton *)backButton
 {
     if (!_backButton) {
@@ -296,50 +307,29 @@
     return _backButton;
 }
 
-- (UIButton *)finishButton
+- (UIButton *)reverseButton
 {
-    if (!_finishButton) {
-        _finishButton = [UIButton buttonWithType:UIButtonTypeCustom];
-        _finishButton.backgroundColor = [UIColor clearColor];
-    
-        _finishButton.frame = CGRectMake(finishBtnX, 16, 58, 27);
-        _finishButton.hidden = NO;
-        [_finishButton setTitle:@"下一步" forState:UIControlStateNormal];
-        _finishButton.titleLabel.font = [UIFont systemFontOfSize:13];
-        [_finishButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 
-        _finishButton.enabled = NO;
-        UIColor *bgColor_disable = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.34];
-        [_finishButton setBackgroundColor:bgColor_disable];
-        [_finishButton addTarget:self action:@selector(finishButtonClicked) forControlEvents:UIControlEventTouchUpInside];
-        _finishButton.layer.cornerRadius = 2;
+    if (!_reverseButton) {
+        _reverseButton = [UIButton buttonWithType:UIButtonTypeCustom];
+        _reverseButton.backgroundColor = [UIColor clearColor];
+        _reverseButton.frame = CGRectMake(CGRectGetWidth(self.bounds) - 44 - 10, SafeTop + 44, 44, 46);
+        [_reverseButton setImage:_uiConfig.switchCameraImage forState:UIControlStateNormal];
+        [_reverseButton addTarget:self action:@selector(reverseButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
         
-    }
-    return _finishButton;
-}
-
-- (UIButton *)cameraIdButton
-{
-    if (!_cameraIdButton) {
-        _cameraIdButton = [UIButton buttonWithType:UIButtonTypeCustom];
-        _cameraIdButton.backgroundColor = [UIColor clearColor];
-        _cameraIdButton.frame = CGRectMake(CGRectGetWidth(self.bounds) - 44 - 10, SafeTop + 44, 44, 46);
-        [_cameraIdButton setImage:_uiConfig.switchCameraImage forState:UIControlStateNormal];
-        [_cameraIdButton addTarget:self action:@selector(cameraIdButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
-        
-        [_cameraIdButton setTitle:@"翻转" forState:UIControlStateNormal];
-        _cameraIdButton.titleLabel.font = [UIFont systemFontOfSize:12];
-        CGFloat titleHeight = _cameraIdButton.titleLabel.intrinsicContentSize.height;
-        CGFloat imageWidth = _cameraIdButton.imageView.frame.size.width;
-        CGFloat imageHeight = _cameraIdButton.imageView.frame.size.height;
+        [_reverseButton setTitle:@"翻转" forState:UIControlStateNormal];
+        _reverseButton.titleLabel.font = [UIFont systemFontOfSize:12];
+        CGFloat titleHeight = _reverseButton.titleLabel.intrinsicContentSize.height;
+        CGFloat imageWidth = _reverseButton.imageView.frame.size.width;
+        CGFloat imageHeight = _reverseButton.imageView.frame.size.height;
         
-        _cameraIdButton.imageEdgeInsets = UIEdgeInsetsMake(0, (44 - imageWidth) * 0.5, titleHeight + 4, 0);
-        _cameraIdButton.titleEdgeInsets = UIEdgeInsetsMake(imageHeight + 4, -imageWidth, 0, 0);
+        _reverseButton.imageEdgeInsets = UIEdgeInsetsMake(0, (44 - imageWidth) * 0.5, titleHeight + 4, 0);
+        _reverseButton.titleEdgeInsets = UIEdgeInsetsMake(imageHeight + 4, -imageWidth, 0, 0);
         
-        _cameraIdButton.layer.shadowColor = [UIColor grayColor].CGColor;
-        _cameraIdButton.layer.shadowOpacity = 0.5;
-        _cameraIdButton.layer.shadowOffset = CGSizeMake(1, 1);
+        _reverseButton.layer.shadowColor = [UIColor grayColor].CGColor;
+        _reverseButton.layer.shadowOpacity = 0.5;
+        _reverseButton.layer.shadowOffset = CGSizeMake(1, 1);
     }
-    return _cameraIdButton;
+    return _reverseButton;
 }
 
 - (UIButton *)musicButton{
@@ -352,7 +342,6 @@
         [_musicButton setTitle:@"音乐" forState:UIControlStateNormal];
         _musicButton.titleLabel.font = [UIFont systemFontOfSize:12];
         CGFloat titleHeight = _musicButton.titleLabel.intrinsicContentSize.height;
-        //        CGFloat titleWidth = btn.titleLabel.intrinsicContentSize.width;
         CGFloat imageWidth = _musicButton.imageView.frame.size.width;
         CGFloat imageHeight = _musicButton.imageView.frame.size.height;
         
@@ -376,7 +365,6 @@
         [_filterButton setTitle:@"滤镜" forState:UIControlStateNormal];
         _filterButton.titleLabel.font = [UIFont systemFontOfSize:12];
         CGFloat titleHeight = _filterButton.titleLabel.intrinsicContentSize.height;
-        //        CGFloat titleWidth = btn.titleLabel.intrinsicContentSize.width;
         CGFloat imageWidth = _filterButton.imageView.frame.size.width;
         CGFloat imageHeight = _filterButton.imageView.frame.size.height;
         _filterButton.imageEdgeInsets = UIEdgeInsetsMake(0, (44 - imageWidth) * 0.5, titleHeight + 4, 0);
@@ -391,16 +379,25 @@
 
 
 
-- (QUProgressView *)progressView {
-    if (!_progressView) {
-        _progressView = [[QUProgressView alloc] initWithFrame:CGRectMake(14, SafeTop + 20, CGRectGetWidth(self.bounds) - 28, 5)];
-        _progressView.showBlink = NO;
-        _progressView.showNoticePoint = YES;
-        _progressView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.01];
-        _progressView.layer.cornerRadius = 3;
-        _progressView.layer.masksToBounds = YES;
+- (UIButton *)finishButton
+{
+    if (!_finishButton) {
+        _finishButton = [UIButton buttonWithType:UIButtonTypeCustom];
+        _finishButton.backgroundColor = [UIColor clearColor];
+        
+        _finishButton.frame = CGRectMake(finishBtnX, 16, 58, 27);
+        _finishButton.hidden = NO;
+        [_finishButton setTitle:@"下一步" forState:UIControlStateNormal];
+        _finishButton.titleLabel.font = [UIFont systemFontOfSize:13];
+        [_finishButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
+        _finishButton.enabled = NO;
+        UIColor *bgColor_disable = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.34];
+        [_finishButton setBackgroundColor:bgColor_disable];
+        [_finishButton addTarget:self action:@selector(finishButtonClicked) forControlEvents:UIControlEventTouchUpInside];
+        _finishButton.layer.cornerRadius = 2;
+        
     }
-    return _progressView;
+    return _finishButton;
 }
 
 - (UIView *)previewView{
@@ -486,13 +483,12 @@
 
  @param sender 前置、后置摄像头切换按钮
  */
-- (void)cameraIdButtonClicked:(id)sender
+- (void)reverseButtonClicked:(id)sender
 {
-    if (CFAbsoluteTimeGetCurrent()-_cameraIdButtonClickTime >1.2) {//限制连续点击时间间隔不能小于1s
-//        NSLog(@"=============>切换摄像头");
-        _cameraIdButtonClickTime =CFAbsoluteTimeGetCurrent();
-        if (self.delegate && [self.delegate respondsToSelector:@selector(cameraIdButtonClicked)]) {
-            [self.delegate cameraIdButtonClicked];
+    if (CFAbsoluteTimeGetCurrent()-_reverseButtonClickTime >1.2) {//限制连续点击时间间隔不能小于1s
+        _reverseButtonClickTime =CFAbsoluteTimeGetCurrent();
+        if (self.delegate && [self.delegate respondsToSelector:@selector(reverseButtonClicked)]) {
+            [self.delegate reverseButtonClicked];
         }
     }
 }

+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/video_ico_speed.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "video_ico_speed@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "video_ico_speed@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/video_ico_speed.imageset/video_ico_speed@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/video_ico_speed.imageset/video_ico_speed@3x.png