ソースを参照

移除编辑视频已废弃的TimeFilterView

Chris 5 年 前
コミット
37d040d642

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

@@ -445,7 +445,6 @@
 		BD0E678522A4C23B00B980BA /* ShoppingCartOrderPayFreightCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD0E678422A4C23B00B980BA /* ShoppingCartOrderPayFreightCell.swift */; };
 		BD0F61F822CAFC8B004650FB /* CommunityVideoAuthModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD0F61F722CAFC8B004650FB /* CommunityVideoAuthModel.swift */; };
 		BD0FAA3722C465B900DDFB37 /* AliyunEditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0FAA3522C465B900DDFB37 /* AliyunEditViewController.m */; };
-		BD0FAA4222C465F500DDFB37 /* AliyunEffectTimeFilterView.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0FAA3C22C465F500DDFB37 /* AliyunEffectTimeFilterView.m */; };
 		BD0FAA4922C4663100DDFB37 /* AlivcEditItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0FAA4622C4663000DDFB37 /* AlivcEditItemModel.m */; };
 		BD0FAA4F22C474D400DDFB37 /* AliyunCoverPickViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0FAA4E22C474D400DDFB37 /* AliyunCoverPickViewController.m */; };
 		BD0FAA5322C4750A00DDFB37 /* AliyunCoverPickView.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0FAA5222C4750A00DDFB37 /* AliyunCoverPickView.m */; };
@@ -1148,8 +1147,6 @@
 		BD0F61F722CAFC8B004650FB /* CommunityVideoAuthModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityVideoAuthModel.swift; sourceTree = "<group>"; };
 		BD0FAA3522C465B900DDFB37 /* AliyunEditViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AliyunEditViewController.m; sourceTree = "<group>"; };
 		BD0FAA3622C465B900DDFB37 /* AliyunEditViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AliyunEditViewController.h; sourceTree = "<group>"; };
-		BD0FAA3C22C465F500DDFB37 /* AliyunEffectTimeFilterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AliyunEffectTimeFilterView.m; sourceTree = "<group>"; };
-		BD0FAA3D22C465F500DDFB37 /* AliyunEffectTimeFilterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AliyunEffectTimeFilterView.h; sourceTree = "<group>"; };
 		BD0FAA4522C4663000DDFB37 /* AlivcEditItemModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlivcEditItemModel.h; sourceTree = "<group>"; };
 		BD0FAA4622C4663000DDFB37 /* AlivcEditItemModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlivcEditItemModel.m; sourceTree = "<group>"; };
 		BD0FAA4D22C474D400DDFB37 /* AliyunCoverPickViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AliyunCoverPickViewController.h; sourceTree = "<group>"; };
@@ -4464,21 +4461,11 @@
 		BD0FAA3822C465F500DDFB37 /* View */ = {
 			isa = PBXGroup;
 			children = (
-				BD0FAA3B22C465F500DDFB37 /* Filter */,
 				BD2E5D4622D87EB000534603 /* Slider */,
 			);
 			path = View;
 			sourceTree = "<group>";
 		};
-		BD0FAA3B22C465F500DDFB37 /* Filter */ = {
-			isa = PBXGroup;
-			children = (
-				BD0FAA3D22C465F500DDFB37 /* AliyunEffectTimeFilterView.h */,
-				BD0FAA3C22C465F500DDFB37 /* AliyunEffectTimeFilterView.m */,
-			);
-			path = Filter;
-			sourceTree = "<group>";
-		};
 		BD0FAA4422C4661B00DDFB37 /* Model */ = {
 			isa = PBXGroup;
 			children = (
@@ -6051,7 +6038,6 @@
 				BD12B69E22B4FAF000AEB10B /* KSMediaPickerNavigationView.swift in Sources */,
 				A70B2C4C228845E800B2449F /* ProductDetailParameterTableViewCell.swift in Sources */,
 				A7FF156A228C6E3600A85748 /* OrderProductTableViewCell.swift in Sources */,
-				BD0FAA4222C465F500DDFB37 /* AliyunEffectTimeFilterView.m in Sources */,
 				A7D5F21F22BB1FA800F8E9AF /* CommunityPlanetViewController.swift in Sources */,
 				A715333E22980CC60017C861 /* ConfigModel.swift in Sources */,
 				BD6122FA22C36A8100D3F513 /* QUProgressView.m in Sources */,

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

@@ -43,7 +43,6 @@
 #import "AliAssetImageGenerator.h"
 #import "AliyunCustomFilter.h"
 #import "AliyunEffectFilterView.h"
-#import "AliyunEffectTimeFilterView.h"
 #import "AliyunMusicPickViewController.h"
 #import "AlivcMacro.h"
 #import "AlivcAlertView.h"
@@ -70,7 +69,7 @@ typedef enum : NSUInteger {
 
 // TODO:此类需再抽一层,否则会太庞大
 @interface AliyunEditViewController () <
-AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDelegate ,AliyunEffectTimeFilterDelegate>
+AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDelegate>
 
 @property(nonatomic, strong) UIView *movieView;
 @property(nonatomic, strong) AliyunTimelineView *currentTimelineView;
@@ -89,7 +88,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
 
 @property (nonatomic, strong) AliyunEffectFilterInfo *intelligentFilter;
 @property(nonatomic, strong) AliyunEffectFilterView *filterView;
-@property(nonatomic, strong) AliyunEffectTimeFilterView *timeFilterView;
 @property (nonatomic, strong) UIView *rateViewWithDim;
 
 /**
@@ -377,33 +375,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
     }
 }
 
-/**
- 初始化一个timeLineView
- 
- @return timeLineView
- */
-- (AliyunTimelineView *)getOneTimeLineView {
-    NSArray *clips = [self.clipConstructor mediaClips];
-    NSMutableArray *mediaInfos = [[NSMutableArray alloc] init];
-    for (int idx = 0; idx < [clips count]; idx++) {
-        AliyunClip *clip = clips[idx];
-        AliyunTimelineMediaInfo *mediaInfo = [[AliyunTimelineMediaInfo alloc] init];
-        mediaInfo.mediaType = (AliyunTimelineMediaInfoType)clip.mediaType;
-        mediaInfo.path = clip.src;
-        mediaInfo.duration = clip.duration;
-        mediaInfo.startTime = clip.startTime;
-        [mediaInfos addObject:mediaInfo];
-    }
-    //缩略图
-    AliyunTimelineView *timeLineView = [[AliyunTimelineView alloc]
-                                        initWithFrame:CGRectMake(0, 0, ScreenWidth, 32)];
-    timeLineView.backgroundColor = [UIColor whiteColor];
-    timeLineView.delegate = (id)self;
-    [timeLineView setMediaClips:mediaInfos segment:8.0 photosPersegent:8];
-    timeLineView.actualDuration = [self.player getStreamDuration];
-    return timeLineView;
-}
-
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     self.isAppear = YES;
@@ -488,19 +459,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
     return _filterView;
 }
 
-//变速(时间特效)
-- (AliyunEffectTimeFilterView *)timeFilterView {
-    if (!_timeFilterView) {
-        _timeFilterView = [[AliyunEffectTimeFilterView alloc]
-                           initWithFrame:CGRectMake(0, ScreenHeight, ScreenWidth, 220)];
-        _timeFilterView.delegate = self;
-        [self.view addSubview:_timeFilterView];
-        _timeFilterView.timelineView = [self getOneTimeLineView];
-    }
-    
-    return _timeFilterView;
-}
-
 - (AliyunDBHelper *)dbHelper {
     if (!_dbHelper) {
         _dbHelper = [[AliyunDBHelper alloc] init];
@@ -931,13 +889,11 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
  能的类型整理:
  //音乐 AliyunEditSouceClickTypeMusic
  //特效 AliyunEditSouceClickTypeEffect
- //时间特效 AliyunEditSouceClickTypeTimeFilter
  @param type 类型
  @return 能:YES,不能:NO
  */
 - (BOOL)isEditFrameType:(AliyunEditSouceClickType)type {
-    if (type == AliyunEditSouceClickTypeMusic ||
-        type == AliyunEditSouceClickTypeTimeFilter) {
+    if (type == AliyunEditSouceClickTypeMusic) {
         return YES;
     }
     return NO;
@@ -957,9 +913,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
         case AliyunEditSouceClickTypeMusic:
             return nil;
             break;
-        case AliyunEditSouceClickTypeTimeFilter:
-            return self.timeFilterView;
-            break;
         default:
             break;
     }
@@ -1420,21 +1373,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
 //时间特效
 - (void)timeButtonClicked {
     self.rateViewWithDim.hidden = false;
-    
-//    AliyunClip *clip = self.clipConstructor.mediaClips[0];
-//    if (self.clipConstructor.mediaClips.count > 1 || clip.mediaType == 1) {
-//        MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
-//        hud.mode = MBProgressHUDModeText;
-//        hud.label.text = @"多段视频或图片不支持时间特效";
-//        hud.backgroundView.style = MBProgressHUDBackgroundStyleSolidColor;
-//        hud.bezelView.color = rgba(0, 0, 0, 0.7);
-//        hud.label.textColor = [UIColor whiteColor];
-//        hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-//        [hud hideAnimated:YES afterDelay:1.5f];
-//        return;
-//    }
-//    self.currentTimelineView = self.timeFilterView.timelineView;
-//    [self enterEditWithActionType:AliyunEditSouceClickTypeTimeFilter animationCompletion:nil];
 }
 
 #pragma mark - AliyunEffectFilter2ViewDelegate - 滤镜
@@ -1514,30 +1452,6 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
     [self resume];
 }
 
-/**
- 应用时间特效的效果
- */
-- (void)applyTimeFilterButtonClick {
-    self.storeTimeFilter = self.currentTimeFilter;
-    [self apply];
-}
-
-/**
- 取消时间特效的效果
- */
-- (void)noApplyTimeFilterButtonClick {
-    [self didSelectNone];
-    [self cancel];
-    if (self.storeTimeFilter) {
-        [self.editor applyTimeFilter:self.storeTimeFilter];
-        [self resume];
-        AliyunTimelineTimeFilterItem *item = [AliyunTimelineTimeFilterItem new];
-        item.startTime = self.storeTimeFilter.startTime;
-        item.endTime = self.storeTimeFilter.endTime;
-        [_currentTimelineView removeAllTimelineTimeFilterItem];
-        [_currentTimelineView addTimelineTimeFilterItem:item];
-    }
-}
 - (void)didSelectNone {
     self.currentTimeFilter = nil;
     [_editor removeTimeFilter];
@@ -1545,64 +1459,4 @@ AliyunIExporterCallback, AliyunIPlayerCallback, AliyunMusicPickViewControllerDel
     [_currentTimelineView removeAllTimelineTimeFilterItem];
 }
 
-- (void)didSelectMomentSlow {
-    [self didSelectNone];
-    AliyunEffectTimeFilter *timeFilter = [[AliyunEffectTimeFilter alloc] init];
-    timeFilter.startTime = [self.player getCurrentStreamTime];
-    timeFilter.endTime = timeFilter.startTime + 1;
-    timeFilter.type = TimeFilterTypeSpeed;
-    timeFilter.param = 0.67;
-    [self.editor applyTimeFilter:timeFilter];
-    self.currentTimeFilter = timeFilter;
-    [self resume];
-    // time line
-    AliyunTimelineTimeFilterItem *item = [AliyunTimelineTimeFilterItem new];
-    item.startTime = timeFilter.startTime;
-    item.endTime = timeFilter.endTime;
-    [_currentTimelineView removeAllTimelineTimeFilterItem];
-    [_currentTimelineView addTimelineTimeFilterItem:item];
-}
-
-//加速
-- (void)didSelectMomentFast {
-    [self didSelectNone];
-    AliyunEffectTimeFilter *timeFilter = [[AliyunEffectTimeFilter alloc] init];
-    timeFilter.startTime = [self.player getCurrentStreamTime];
-    timeFilter.endTime = timeFilter.startTime + 1;
-    timeFilter.type = TimeFilterTypeSpeed;
-    timeFilter.param = 1.5;
-    [self.editor applyTimeFilter:timeFilter];
-    self.currentTimeFilter = timeFilter;
-    [self resume];
-    // time line
-    AliyunTimelineTimeFilterItem *item = [AliyunTimelineTimeFilterItem new];
-    item.startTime = timeFilter.startTime;
-    item.endTime = timeFilter.endTime;
-    [_currentTimelineView removeAllTimelineTimeFilterItem];
-    [_currentTimelineView addTimelineTimeFilterItem:item];
-}
-
-//重复
-- (void)didSelectRepeat {
-    [self didSelectNone];
-    AliyunEffectTimeFilter *timeFilter = [[AliyunEffectTimeFilter alloc] init];
-    timeFilter.type = TimeFilterTypeRepeat;
-    timeFilter.param = 3;
-    timeFilter.startTime = [self.player getCurrentStreamTime];
-    timeFilter.endTime = timeFilter.startTime + 1;
-    [self.editor applyTimeFilter:timeFilter];
-    self.currentTimeFilter = timeFilter;
-    [self resume];
-    // time line
-    AliyunTimelineTimeFilterItem *item = [AliyunTimelineTimeFilterItem new];
-    item.startTime = timeFilter.startTime;
-    item.endTime = timeFilter.endTime;
-    [_currentTimelineView removeAllTimelineTimeFilterItem];
-    [_currentTimelineView addTimelineTimeFilterItem:item];
-}
-//倒放
-- (void)didSelectInvert:(void (^)(BOOL))success {
-    NSLog(@"----点击了-倒放");
-}
-
 @end

+ 1 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Model/AlivcEditItemModel.h

@@ -13,8 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
 //编辑底部事件类型定义
 typedef NS_ENUM(NSInteger,AliyunEditSouceClickType){
     AliyunEditSouceClickTypeFilter = 0,
-    AliyunEditSouceClickTypeMusic,
-    AliyunEditSouceClickTypeTimeFilter
+    AliyunEditSouceClickTypeMusic
 };
 
 @interface AlivcEditItemModel : NSObject

+ 0 - 61
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/Filter/AliyunEffectTimeFilterView.h

@@ -1,61 +0,0 @@
-//
-//  AliyunEffectTimeFilterView.h
-//  qusdk
-//
-//  Created by Vienta on 2018/2/26.
-//  Copyright © 2018年 Alibaba Group Holding Limited. All rights reserved.
-//  时间特效View
-
-#import <UIKit/UIKit.h>
-@class AliyunTimelineView;
-@protocol AliyunEffectTimeFilterDelegate <NSObject>
-/**
- 应用时间特效的效果
- */
-- (void)applyTimeFilterButtonClick;
-
-/**
- 取消时间特效的效果
- */
-- (void)noApplyTimeFilterButtonClick;
-
-/**
- 时间特效选中无效果
- */
-- (void)didSelectNone;
-
-/**
- 时间特效瞬间变慢
- */
-- (void)didSelectMomentSlow;
-
-/**
- 时间特效瞬间变快
- */
-- (void)didSelectMomentFast;
-
-/**
- 反复
- */
-- (void)didSelectRepeat;
-
-/**
- 倒放
- */
-- (void)didSelectInvert:(void (^)(BOOL success))success;
-
-@end
-
-@interface AliyunEffectTimeFilterView : UIView
-/**
- 设置缩略图。frame自适应,不用设置frame
- 
- */
-@property (nonatomic, strong) AliyunTimelineView *timelineView;
-
-/**
- 此类的代理属性
- */
-@property (nonatomic, weak) id<AliyunEffectTimeFilterDelegate> delegate;
-
-@end

+ 0 - 378
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/Filter/AliyunEffectTimeFilterView.m

@@ -1,378 +0,0 @@
-//
-//  AliyunEffectTimeFilterView.m
-//  qusdk
-//
-//  Created by Vienta on 2018/2/26.
-//  Copyright © 2018年 Alibaba Group Holding Limited. All rights reserved.
-//
-
-#import "AliyunEffectTimeFilterView.h"
-#import "UIView+AlivcHelper.h"
-#import "AliyunTimelineView.h"
-#import "AlivcEditBottomHeaderView.h"
-#import "AlivcMacro.h"
-#import "AlivcImage.h"
-
-@interface AliyunEffectTimeFilterView()
-
-/**
- 下选中的按钮
- */
-@property(nonatomic, weak) UIButton *selectButton;
-
-/**
- 提示语
- */
-@property(nonatomic,weak) UILabel *tipLabel;
-
-
-/**
- 应用时间特效按钮
- */
-@property(nonatomic,weak) UIButton *applyButton;
-
-/**
- 取消时间特效按钮
- */
-@property(nonatomic,weak) UIButton *noApplyButton;
-/**
- 占位view
- */
-@property (nonatomic, strong) UIView *timeLinePalletView;
-/**
- 首次提醒按钮
- */
-@property(nonatomic,weak) UIButton *firstTipButton;
-
-/**
- 保存状态的button
- */
-@property(nonatomic,strong) UIButton *storeButton;
-
-/**
- 无效果按钮
- */
-@property(nonatomic,strong) UIButton *noneButton;
-
-/**
- 无效果Label
- */
-@property(nonatomic,strong) UILabel  *noneLabel;
-
-/**
- 慢动作按钮
- */
-@property(nonatomic,strong) UIButton *slowButton;
-
-/**
- 慢动作Label
- */
-@property(nonatomic,strong) UILabel  *slowLabel;
-
-/**
- 加速按钮
- */
-@property(nonatomic,strong) UIButton *fastButton;
-
-/**
- 加速Label
- */
-@property(nonatomic,strong) UILabel  *fastLabel;
-
-/**
- 倒放按钮
- */
-@property(nonatomic,strong) UIButton *backRunButton;
-
-/**
- 倒放Label
- */
-@property(nonatomic,strong) UILabel  *backRunLabel;
-/**
- 反复按钮
- */
-@property(nonatomic,strong) UIButton *repeatButton;
-/**
- 反复Label
-*/
-@property(nonatomic,strong) UILabel  *repeatLabel;
-@end
-
-@implementation AliyunEffectTimeFilterView
-
-- (instancetype)initWithFrame:(CGRect)frame
-{
-    if (self = [super initWithFrame:frame]) {
-        self.backgroundColor = [UIColor clearColor];
-        [self addSubViews];
-    }
-    return self;
-}
-
-/**
- 添加子控件
- */
-- (void)addSubViews {
-    [self addSubview:self.timeLinePalletView];
-    [self addVisualEffect];
-    UILabel *tipLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 117, 250, 12)];
-    tipLabel.text = @"点击添加效果";
-    tipLabel.font = [UIFont systemFontOfSize:12];
-    tipLabel.textColor = [UIColor whiteColor];
-    [self addSubview:tipLabel];
-    self.tipLabel = tipLabel;
-    
-    AlivcEditBottomHeaderView *headerView = [[AlivcEditBottomHeaderView alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), 45)];
-    [self addSubview:headerView];
-    __weak typeof(self)weakSelf = self;
-    [headerView bindingApplyOnClick:^{
-        [weakSelf apply];
-    } cancelOnClick:^{
-        [weakSelf noApply];
-    }];
-    
-    _noneButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    _slowButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    _fastButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    _repeatButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    _backRunButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    
-    NSArray *buttons = @[_noneButton, _repeatButton, _slowButton, _fastButton, _backRunButton];
-    NSArray *buttonNormalImages = @[@"transition_null_Nor",
-                                    @"shortVideo_edit_timeFliter_repeat",
-                                     @"shortVideo_edit_timeFliter_slow",
-                                     @"shortVideo_edit_timeFliter_fast",
-                                     @"shortVideo_edit_timeFliter_backRun"];
-    
-    
-    NSArray *buttonActions = @[@"noneButtonClicked:",
-                               @"repeatButtonClicked:",
-                               @"slowButtonClicked:",
-                               @"fastButtonClicked:",
-                               @"backrunButtonClicked:"];
-    
-    float dlt = (ScreenWidth - 40 - 50 * 5) / 4;
-    float centerY = 160;
-    
-    for (int i = 0; i < [buttons count]; i++) {
-        UIButton *btn = buttons[i];
-        btn.bounds = CGRectMake(0, 0, 50, 50);
-        btn.center = CGPointMake(45+i*(50+dlt), centerY);
-        btn.layer.masksToBounds = YES;
-        [btn setExclusiveTouch:YES];
-        btn.layer.cornerRadius = 25;
-        [btn setExclusiveTouch:YES];
-        [btn setImage:[AlivcImage imageNamed:buttonNormalImages[i]] forState:UIControlStateNormal];
-        [btn setImage:[UIImage imageNamed:@"edit_topic_pitchon"] forState:UIControlStateSelected];
-        btn.backgroundColor = rgba(255, 255, 255, 0.2);
-        SEL action = NSSelectorFromString(buttonActions[i]);
-        [btn addTarget:self action:action forControlEvents:UIControlEventTouchUpInside];
-        [self addSubview:btn];
-        if (i == 0) {
-            btn.selected = YES;
-            btn.backgroundColor = AlivcOxRGB(0x00c1de);
-            self.selectButton = btn;
-        }
-    }
-    
-    _noneLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
-    _slowLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
-    _fastLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
-    _repeatLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
-    _backRunLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
-    float labelCenterY = centerY + 35;
-    
-    NSArray *labels = @[_noneLabel, _slowLabel, _fastLabel, _repeatLabel, _backRunLabel];
-    NSArray *labelTitles = @[@"无效果", @"反复", @"慢动作", @"加速", @"倒放"];
-    for (int i = 0; i < [labels count]; i++) {
-        UILabel *label = labels[i];
-        label.center = CGPointMake(45+i*(50+dlt), labelCenterY);
-        [label setText:labelTitles[i]];
-        [label setTextAlignment:NSTextAlignmentCenter];
-        [label setTextColor:AlivcOxRGB(0xc3c5c6)];
-        [label setFont:[UIFont systemFontOfSize:12]];
-        [self addSubview:label];
-    }
-    UIButton *firstTip = [[UIButton alloc] initWithFrame:CGRectMake(20, 96, 57.0 + (50+dlt), 35)];
-    [firstTip setTitle:@"点击可添加效果" forState:UIControlStateNormal];
-    firstTip.titleEdgeInsets = UIEdgeInsetsMake(5, 0, 8, 0);
-    firstTip.titleLabel.font = [UIFont systemFontOfSize:14];
-    firstTip.hidden = YES;
-    [firstTip addTarget:self action:@selector(removeFirstTip) forControlEvents:UIControlEventTouchUpInside];
-    [self addSubview:firstTip];
-    self.firstTipButton = firstTip;
-    if (![[NSUserDefaults standardUserDefaults] integerForKey:@"timeFilterFirst"]) {
-        [[NSUserDefaults standardUserDefaults] setInteger:1 forKey:@"timeFilterFirst"];
-        self.firstTipButton.hidden = NO;
-        self.tipLabel.hidden = YES;
-    }else{
-        self.firstTipButton.hidden = YES;
-        self.tipLabel.hidden = NO;
-    }
-}
-
-/**
- 去除首次提醒,显示正常提醒
- */
-- (void)removeFirstTip{
-    self.tipLabel.hidden = NO;
-    self.firstTipButton.hidden = YES;
-}
-/**
- 从中间拉伸图片,不影响边缘效果
- 
- @param name 图片名称
- @return 拉伸好的图片
- */
-- (UIImage *)resizableImage:(NSString *)name
-{
-    UIImage *image = [AlivcImage imageNamed:name];
-    return [image stretchableImageWithLeftCapWidth:image.size.width * 0.5 topCapHeight:image.size.height * 0.5];
-}
-
-
-/**
- 点击应用的触发方法
- */
-- (void)apply{
-    self.storeButton = self.selectButton;
-    if (_delegate) {
-        [self removeFirstTip];
-        [_delegate applyTimeFilterButtonClick];
-    }
-}
-
-/**
- 点击取消的触发方法
- */
-- (void)noApply{
-    if (_delegate) {
-        if (self.storeButton) {
-            [self buttonSelected:self.storeButton];
-        }else{
-            [self buttonSelected:_noneButton];
-        }
-        [_delegate noApplyTimeFilterButtonClick];
-    }
-}
-
-/**
- 点击无效果的触发方法
-
- @param sender 无效果按钮
- */
-- (void)noneButtonClicked:(id)sender
-{
-    [_delegate didSelectNone];
-    [self buttonSelected:sender];
-}
-
-
-/**
- 点击慢动作按钮的触发方法
-
- @param sender 慢动作按钮
- */
-- (void)slowButtonClicked:(id)sender
-{
-    [self buttonSelected:sender];
-    [_delegate didSelectMomentSlow];
-    
-}
-
-
-/**
- 点击加速按钮的触发方法
-
- @param sender 加速按钮
- */
-- (void)fastButtonClicked:(id)sender
-{
-    
-    [self buttonSelected:sender];
-    
-    [_delegate didSelectMomentFast];
-    
-}
-
-
-/**
- 点击重复按钮的触发方法
-
- @param sender 重复按钮
- */
-- (void)repeatButtonClicked:(id)sender
-{
-    [self buttonSelected:sender];
-    [_delegate didSelectRepeat];
-}
-
-
-/**
- 点击倒放按钮的触发方法
-
- @param sender 倒放按钮
- */
-- (void)backrunButtonClicked:(id)sender
-{
-    if (self.selectButton == sender) {
-        return;
-    }
-    UIButton *lastBtn = self.selectButton;
-    [self buttonSelected:sender];
-    [_delegate didSelectInvert:^(BOOL success) {
-        if (!success) {
-            [self buttonSelected:lastBtn];
-        }
-    }];
-}
-
-/**
- 功能按钮的点击处理
-
- @param button 功能按钮
- */
-- (void)buttonSelected:(UIButton *)button {
-   
-    self.selectButton.selected = NO;
-    self.selectButton.backgroundColor = rgba(255, 255, 255, 0.2);
-    self.selectButton = button;
-    self.selectButton.selected = YES;
-    self.selectButton.backgroundColor = AlivcOxRGB(0x00c1de);
-    [self removeFirstTip];
-}
-
-
-/**
- 重写timelineView的set方法
-
- @param timelineView 进度条
- */
--(void)setTimelineView:(AliyunTimelineView *)timelineView{
-    _timelineView = timelineView;
-    if (_timelineView) {
-        _timelineView.frame = CGRectMake(0, 15, CGRectGetWidth(_timeLinePalletView.frame), CGRectGetHeight(_timeLinePalletView.frame)-10);
-        _timelineView.backgroundColor = self.backgroundColor;
-        [_timeLinePalletView addSubview:_timelineView];
-    }
-}
-
-
-/**
- 占位view的懒加载
-
- @return 占位view
- */
-- (UIView *)timeLinePalletView{
-    if (!_timeLinePalletView) {
-        _timeLinePalletView = [[UIView alloc]initWithFrame:CGRectMake(0, 44, ScreenWidth, 40)];
-        _timeLinePalletView.backgroundColor = [UIColor clearColor];
-        if (_timelineView) {
-            _timelineView.frame = CGRectMake(0, 5, CGRectGetWidth(_timeLinePalletView.frame), CGRectGetHeight(_timeLinePalletView.frame)-10);
-            _timelineView.backgroundColor = self.backgroundColor;
-            [_timeLinePalletView addSubview:_timelineView];
-        }
-    }
-    return _timeLinePalletView;
-}
-@end