Bladeren bron

video - 部分UI调整

Chris 5 jaren geleden
bovenliggende
commit
bfca9063c7

+ 0 - 18
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/Model/AliyunEffectMvGroup.h

@@ -9,24 +9,6 @@
 #import "AliyunEffectInfo.h"
 #import "AliyunEffectMvInfo.h"
 
-
-/**
- MV比例
-
- - AliyunEffectMVRatio9To16: 9:16
- - AliyunEffectMVRatio3To4: 3:4
- - AliyunEffectMVRatio1To1: 1:1
- - AliyunEffectMVRatio4To3: 4:3
- - AliyunEffectMVRatio16To9: 16:9
- */
-typedef NS_ENUM(NSInteger, AliyunEffectMVRatio) {
-    AliyunEffectMVRatio9To16,
-    AliyunEffectMVRatio3To4,
-    AliyunEffectMVRatio1To1,
-    AliyunEffectMVRatio4To3,
-    AliyunEffectMVRatio16To9,
-};
-
 /**
  MV组信息
  */

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

@@ -24,7 +24,7 @@
     self.backgroundColor = [UIColor blackColor];
     self.backImage = [UIImage imageNamed:@"avcBackIcon"];
 
-    _filterImage = [AlivcImage imageNamed:@"alivc_svEdit_filter"];
+    _filterImage = [UIImage imageNamed:@"video_ico_filter"];
     
     _musicImage = [AlivcImage imageNamed:@"alivc_svEdit_music"];
     _pasterImage = [AlivcImage imageNamed:@"alivc_svEdit_paster"];

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

@@ -21,8 +21,7 @@
 - (void)p_setDefaultValue{
     
     self.backgroundColor = [UIColor blackColor];
-    self.backImage = [UIImage imageNamed:@"back"];
-
+    self.backImage = [UIImage imageNamed:@"navbar_back_white"];
 }
 
 @end

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

@@ -23,55 +23,55 @@
 @implementation AliyunCoverPickViewController
 
 - (void)viewDidLoad {
-  [super viewDidLoad];
-  [self setupSubviews];
-  dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
-                 ^{
-                   [self.pickView loadThumbnailData];
-                 });
+    [super viewDidLoad];
+    [self setupSubviews];
+    
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
+             ^{
+               [self.pickView loadThumbnailData];
+    });
 }
 
 - (void)setupSubviews {
-  self.topView = [[AliyunPublishTopView alloc]
-      initWithFrame:CGRectMake(0, 0, ScreenWidth, StatusBarHeight + 44)];
-  self.topView.nameLabel.text = @"编辑封面";
-  [self.topView.cancelButton setImage:[AliyunImage imageNamed:@"cancel"]
-                             forState:UIControlStateNormal];
-  [self.topView.cancelButton setTitle:nil forState:UIControlStateNormal];
-  [self.topView.finishButton setImage:[AliyunImage imageNamed:@"check"]
-                             forState:UIControlStateNormal];
-  [self.topView.finishButton setTitle:nil forState:UIControlStateNormal];
-  self.topView.delegate = self;
-  self.topView.delegate = self;
-  [self.view addSubview:self.topView];
-
-  CGFloat pickWith = ScreenWidth - 56;
-  CGFloat factor = _outputSize.height / _outputSize.width;
-  CGFloat width = ScreenWidth;
-  CGFloat heigt = ScreenWidth * factor;
-  CGFloat maxheight =
+    CGFloat pickWith = ScreenWidth - 56;
+    CGFloat factor = _outputSize.height / _outputSize.width;
+    CGFloat width = ScreenWidth;
+    CGFloat heigt = ScreenWidth * factor;
+    CGFloat maxheight =
       ScreenHeight - StatusBarHeight - 69 - SafeBottom - pickWith / 8 - 30;
 
-  if (heigt > maxheight) {
-    heigt = maxheight;
-    width = heigt / factor;
-  }
-  CGFloat offset = (maxheight - heigt) / 2;
+    if (heigt > maxheight) {
+        heigt = maxheight;
+        width = heigt / factor;
+    }
+    CGFloat offset = (maxheight - heigt) / 2;
 
-  self.coverView = [[UIImageView alloc]
+    self.coverView = [[UIImageView alloc]
       initWithFrame:CGRectMake((ScreenWidth - width) / 2,
                                StatusBarHeight + 44 + offset, width, heigt)];
-  [self.view addSubview:self.coverView];
+    self.coverView = [[UIImageView alloc]
+                      initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight)];
+    [self.view addSubview:self.coverView];
+    
+    self.topView = [[AliyunPublishTopView alloc]
+                    initWithFrame:CGRectMake(0, 0, ScreenWidth, StatusBarHeight + 44)];
+    [self.topView.cancelButton setImage:[UIImage imageNamed:@"navbar_back_white"]
+                               forState:UIControlStateNormal];
+    [self.topView.cancelButton setTitle:nil forState:UIControlStateNormal];
+    [self.topView.finishButton setTitle:@"下一步" forState:UIControlStateNormal];
+    self.topView.delegate = self;
+    self.topView.delegate = self;
+    [self.view addSubview:self.topView];
 
-  self.pickView = [[AliyunCoverPickView alloc]
+    self.pickView = [[AliyunCoverPickView alloc]
       initWithFrame:CGRectMake(28,
                                ScreenHeight - SafeBottom - pickWith / 8 - 30,
                                pickWith, pickWith / 8)];
-  self.pickView.delegate = self;
-  self.pickView.videoPath = _videoPath;
-  self.pickView.outputSize = _outputSize;
-  [self.view addSubview:self.pickView];
-  self.view.backgroundColor = [AliyunIConfig config].backgroundColor;
+    self.pickView.delegate = self;
+    self.pickView.videoPath = _videoPath;
+    self.pickView.outputSize = _outputSize;
+    [self.view addSubview:self.pickView];
+    self.view.backgroundColor = [AliyunIConfig config].backgroundColor;
 }
 
 #pragma mark - top view delegate
@@ -81,8 +81,11 @@
 }
 
 - (void)finishButtonClicked {
-  _finishHandler(_coverView.image);
-  [self.navigationController popViewControllerAnimated:YES];
+    // FIXME: 完成封面选择,去发布
+    NSLog(@"完成封面选择,去发布");
+    
+//    _finishHandler(_coverView.image);
+//    [self.navigationController popViewControllerAnimated:YES];
 }
 
 #pragma mark - pick view delegate

+ 0 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCoverPick/View/AliyunPublishTopView.h

@@ -13,7 +13,6 @@
 @end
 @interface AliyunPublishTopView : UIView
 @property (nonatomic, weak) id<AliyunPublishTopViewDelegate> delegate;
-@property (nonatomic, strong) UILabel *nameLabel;
 @property (nonatomic, strong) UIButton *cancelButton;
 @property (nonatomic, strong) UIButton *finishButton;
 @end

+ 1 - 11
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCoverPick/View/AliyunPublishTopView.m

@@ -32,8 +32,7 @@
 
   UIView *topView = [[UIView alloc] init];
   topView.frame = CGRectMake(0, 0, ScreenWidth, self.frame.size.height);
-  topView.backgroundColor = [AliyunIConfig config].backgroundColor;
-  ;
+  topView.backgroundColor = [UIColor clearColor];
   [self addSubview:topView];
 
   UIButton *backButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
@@ -50,15 +49,6 @@
   self.cancelButton = backButton;
   [topView addSubview:backButton];
 
-  self.nameLabel = [[UILabel alloc] init];
-  self.nameLabel.frame =
-      CGRectMake((ScreenWidth - 68) / 2, StatusBarHeight, 68, 44);
-  self.nameLabel.font = [UIFont systemFontOfSize:14.f];
-  self.nameLabel.textColor = [UIColor whiteColor];
-  self.nameLabel.textAlignment = NSTextAlignmentCenter;
-  self.nameLabel.text = @"我的视频";
-  [topView addSubview:self.nameLabel];
-
   UIButton *nextButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
   nextButton.frame = CGRectMake(ScreenWidth - 44 - 4, StatusBarHeight, 44, 44);
   [nextButton setTitle:NSLocalizedString(@"finish_subtitle_edit", nil)

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

@@ -259,12 +259,12 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
     }
     [self.view addSubview:self.backButton];
     
-    self.backButton.frame = CGRectMake(10, y, 44, 27);
+    self.backButton.frame = CGRectMake(5, SafeTop + 2, 40, 40);
     
     //发布按钮
     [self.view addSubview:self.publishButton];
     
-    self.publishButton.frame  =  CGRectMake(ScreenWidth - 58 -10, y, 58, 27);
+    self.publishButton.frame  =  CGRectMake(ScreenWidth - 14 - 64, SafeTop + 8, 64, 26);
     
     self.currentTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake((ScreenWidth-60)/2, IS_IPHONEX?(SafeTop-10):0, 60, 12)];
     self.currentTimeLabel.backgroundColor = RGBToColor(27, 33, 51);
@@ -525,12 +525,7 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
 - (UIButton *)backButton {
     if (!_backButton) {
         _backButton = [UIButton buttonWithType:UIButtonTypeCustom];
-        [_backButton setImage:_uiConfig.backImage forState:UIControlStateNormal];
-        [_backButton setImage:_uiConfig.backImage forState:UIControlStateSelected];
-        [_backButton setTitleColor:[UIColor whiteColor]
-                          forState:UIControlStateNormal];
-        [_backButton setTitleColor:[UIColor whiteColor]
-                          forState:UIControlStateSelected];
+        [_backButton setImage:[UIImage imageNamed:@"navbar_back_white"] forState:UIControlStateNormal];
         [_backButton setBackgroundColor:[UIColor clearColor]];
         [_backButton addTarget:self
                         action:@selector(back)
@@ -542,14 +537,13 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
 - (UIButton *)publishButton {
     if (!_publishButton) {
         _publishButton = [UIButton buttonWithType:UIButtonTypeCustom];
-        _publishButton.backgroundColor = [UIColor clearColor];
         [_publishButton setTitle:@"下一步" forState:UIControlStateNormal];
-        _publishButton.titleLabel.font = [UIFont systemFontOfSize:13];
+        _publishButton.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];
         [_publishButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
-        UIColor *bgColor_enable =  [UIColor colorWithRed:252/255.0 green:68/255.0 blue:72/255.0 alpha:1/1.0];
-        [_publishButton setBackgroundColor:bgColor_enable];
+        _publishButton.backgroundColor = RGBToColor(98, 204, 116);
         [_publishButton addTarget:self action:@selector(publish) forControlEvents:UIControlEventTouchUpInside];
-        _publishButton.layer.cornerRadius = 2;
+        _publishButton.layer.cornerRadius = 13;
+        _publishButton.layer.masksToBounds = YES;
     }
     return _publishButton;
 }

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

@@ -998,10 +998,7 @@
             if (self.editBlock) {
                 self.editBlock();
             }
-//            UIViewController *editVC = [[AlivcShortVideoRoute shared]alivcViewControllerWithType:AlivcViewControlEdit];
-//            [self.navigationController pushViewController:editVC animated:YES];
         }
-     
     }
    
 }
@@ -1018,7 +1015,6 @@
 - (void)recoderError:(NSError *)error
 {
     [MBProgressHUD hideHUDForView:self.view animated:YES];
-    NSLog(@"---------->recoderError");
     self.magicCameraView.backButton.enabled = YES;
     _magicCameraView.hide = NO;
     [_magicCameraView resetRecordButtonUI];
@@ -1026,7 +1022,6 @@
     _magicCameraView.realVideoCount = [_clipManager partCount];
     _magicCameraView.userInteractionEnabled =YES;
     [MBProgressHUD showWarningMessage:error.localizedDescription inView:self.view];
-    
 }
 -(void)recorderDidStartPreview {
 //    self.magicCameraView.userInteractionEnabled =YES;

+ 1 - 5
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/View/MagicCameraPressCircleView.m

@@ -7,9 +7,7 @@
 //
 
 
-
 #import "MagicCameraPressCircleView.h"
-#import "AlivcImage.h"
 
 @implementation MagicCameraPressCircleView
 
@@ -17,12 +15,10 @@
 {
     if (self = [super initWithFrame:frame]) {
         
-        [self setImage:[AlivcImage imageNamed:@"shortVideo_recordBtn_singleClick"] forState:UIControlStateNormal];
+        [self setImage:[UIImage imageNamed:@"video_btn_shoot"] forState:UIControlStateNormal];
         [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
         self.titleLabel.font = [UIFont systemFontOfSize:14];
         self.backgroundColor = [UIColor clearColor];
-
-        
     }
     return self;
 }