update to v3.4.1
优化了播放音频时,可能出现的缓冲时间过长的问题。
Showing
Demo/DWAudioPlayView.h
0 → 100644
Demo/DWAudioPlayView.m
0 → 100644
// | ||
// DWBatchDownloadChooseView.m | ||
// Demo | ||
// | ||
// Created by zwl on 2019/1/23. | ||
// Copyright © 2019 com.bokecc.www. All rights reserved. | ||
// | ||
#import "DWBatchDownloadChooseView.h" | ||
#import "DWBatchDownloadChooseTableViewCell.h" | ||
@interface DWBatchDownloadChooseView () <UITableViewDelegate,UITableViewDataSource> | ||
@property(nonatomic,strong) UIView * maskView; | ||
@property(nonatomic,strong) UIView * bgView; | ||
@property(nonatomic,strong) UITableView * tableView; | ||
@property(nonatomic,strong) UIButton * cancelButton; | ||
@property(nonatomic,strong) UIButton * sureButton; | ||
@property(nonatomic,strong) NSArray * videoIds; | ||
@end | ||
@implementation DWBatchDownloadChooseView | ||
-(instancetype)initWithVideoIds:(NSArray *)videoIds | ||
{ | ||
if (self == [super init]) { | ||
[DWAPPDELEGATE.window addSubview:self]; | ||
self.hidden = YES; | ||
[self mas_makeConstraints:^(MASConstraintMaker *make) { | ||
make.edges.equalTo(self.superview); | ||
}]; | ||
[self addSubview:self.maskView]; | ||
[self.maskView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
make.edges.equalTo(self); | ||
}]; | ||
UITapGestureRecognizer * maskTap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismiss)]; | ||
[self.maskView addGestureRecognizer:maskTap]; | ||
//处理数据 | ||
NSMutableArray * dataArray = [NSMutableArray array]; | ||
for (NSString * videoId in [videoIds copy]) { | ||
[dataArray addObject:[@{@"id":videoId,@"isSelect":@NO} mutableCopy]]; | ||
} | ||
self.videoIds = dataArray; | ||
[self addSubview:self.bgView]; | ||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
make.center.equalTo(self); | ||
make.width.equalTo(self).offset(-80); | ||
// make.height.equalTo(self).offset(-150); | ||
make.height.equalTo(@(ScreenHeight / 3.0 * 2)); | ||
}]; | ||
[self.bgView addSubview:self.tableView]; | ||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
make.centerX.equalTo(self.bgView); | ||
make.top.equalTo(@16); | ||
make.width.equalTo(self.bgView).offset(-20); | ||
make.bottom.equalTo(self.bgView).offset(-40 - 16); | ||
}]; | ||
[self.tableView reloadData]; | ||
[self.bgView addSubview:self.cancelButton]; | ||
[self.cancelButton mas_makeConstraints:^(MASConstraintMaker *make) { | ||
make.height.equalTo(@30); | ||
make.top.equalTo(self.tableView.mas_bottom).offset(5); | ||
make.width.equalTo(@100); | ||
make.left.equalTo(@30); | ||
}]; | ||
[self.bgView addSubview:self.sureButton]; | ||
[self.sureButton mas_makeConstraints:^(MASConstraintMaker *make) { | ||
make.height.equalTo(_cancelButton); | ||
make.top.equalTo(_cancelButton); | ||
make.width.equalTo(_cancelButton); | ||
make.right.equalTo(@(-30)); | ||
}]; | ||
[[NSNotificationCenter defaultCenter] addObserver:self | ||
selector:@selector(onDeviceOrientationChange) | ||
name:UIDeviceOrientationDidChangeNotification | ||
object:nil]; | ||
} | ||
< |