Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DrWater
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
路少雄
DrWater
Commits
e78ce649
Commit
e78ce649
authored
Mar 18, 2024
by
路少雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进度条
parent
10dde3a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
30 deletions
+47
-30
DJMHomeTY/Page/DRFacial/View/DXHFXView.m
+47
-30
No files found.
DJMHomeTY/Page/DRFacial/View/DXHFXView.m
View file @
e78ce649
...
...
@@ -10,9 +10,10 @@
#import <KTVHTTPCache/KTVHTTPCache.h>
#import <Photos/Photos.h>
#import "DXHFXVideoCell.h"
#import "DXProgressBarView.h"
static
NSString
*
dXHFXVideoCell
=
@"DXHFXVideoCell"
;
@interface
DXHFXView
()
<
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
UIGestureRecognizerDelegate
>
@interface
DXHFXView
()
<
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
UIGestureRecognizerDelegate
,
DXProgressBarViewDelegate
>
...
...
@@ -50,6 +51,8 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
@property
(
nonatomic
,
strong
)
UIButton
*
noChangeBtn
;
@property
(
nonatomic
,
strong
)
DXProgressBarView
*
progressBarView
;
@end
...
...
@@ -66,6 +69,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
return
self
;
}
-
(
void
)
setCurrentStress
:(
NSString
*
)
currentStress
{
_currentStress
=
currentStress
;
self
.
stressLb
.
text
=
currentStress
;
...
...
@@ -287,6 +291,16 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
make
.
size
.
mas_equalTo
(
CGSizeMake
(
32
,
32
));
}];
[
self
layoutIfNeeded
];
self
.
progressBarView
=
[[
DXProgressBarView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
containerView
.
bottom
+
5
,
HJScreenWidth
-
38
,
30
)];
self
.
progressBarView
.
delegate
=
self
;
[
self
addSubview
:
self
.
progressBarView
];
// if([HJUserDefaults objectForKey:@"videoVolumeIsOn"]){
// NSString *videoVolumeIsOn = [HJUserDefaults objectForKey:@"videoVolumeIsOn"];
// if([videoVolumeIsOn isEqualToString:@"1"]){
...
...
@@ -575,36 +589,39 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
}];
}
-
(
void
)
setTimeLineWithString
:
(
NSString
*
)
describeInfo
{
// self.timesBtnArray = [NSMutableArray array];
//
// NSArray *itemTitleArray = [describeInfo componentsSeparatedByString:@","];
// NSMutableArray *titleArray = [NSMutableArray array];
// NSMutableArray *titleTimeArray = [NSMutableArray array];
// NSMutableArray *timeArray = [NSMutableArray array];
// for (int i = 0; i < itemTitleArray.count; i ++) {
// NSArray *temparray = [itemTitleArray[i] componentsSeparatedByString:@":"];
// [titleArray addObject:temparray[0]];
// [titleTimeArray addObject:temparray[1]];
// [timeArray addObject:temparray[2]];
// }
// NSMutableArray *titleTimeArray1 = [NSMutableArray array];
// for (__strong NSString *titleTime in titleTimeArray) {
// if([titleTime intValue] < 60){
// if (!titleTime || [titleTime isEqualToString:@""]) {
// titleTime = @"";
//// titleTime = [NSString stringWithFormat:@"%@s",titleTime];
// }else{
self
.
timesBtnArray
=
[
NSMutableArray
array
];
NSArray
*
itemTitleArray
=
[
describeInfo
componentsSeparatedByString
:
@","
];
NSMutableArray
*
titleArray
=
[
NSMutableArray
array
];
NSMutableArray
*
titleTimeArray
=
[
NSMutableArray
array
];
NSMutableArray
*
timeArray
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
itemTitleArray
.
count
;
i
++
)
{
NSArray
*
temparray
=
[
itemTitleArray
[
i
]
componentsSeparatedByString
:
@":"
];
[
titleArray
addObject
:
temparray
[
0
]];
[
titleTimeArray
addObject
:
temparray
[
1
]];
[
timeArray
addObject
:
temparray
[
2
]];
}
NSMutableArray
*
titleTimeArray1
=
[
NSMutableArray
array
];
for
(
__strong
NSString
*
titleTime
in
titleTimeArray
)
{
if
([
titleTime
intValue
]
<
60
){
if
(
!
titleTime
||
[
titleTime
isEqualToString
:
@""
])
{
titleTime
=
@""
;
// titleTime = [NSString stringWithFormat:@"%@s",titleTime];
// }
//
// }else if([titleTime intValue] % 60 == 0){
// titleTime = [NSString stringWithFormat:@"%dmin",[titleTime intValue] / 60];
// }else{
// titleTime = [NSString stringWithFormat:@"%dmins %ds",[titleTime intValue] / 60,[titleTime intValue] % 60];
// }
// [titleTimeArray1 addObject:titleTime];
// }
//
}
else
{
titleTime
=
[
NSString
stringWithFormat
:
@"%@s"
,
titleTime
];
}
}
else
if
([
titleTime
intValue
]
%
60
==
0
){
titleTime
=
[
NSString
stringWithFormat
:
@"%dmin"
,[
titleTime
intValue
]
/
60
];
}
else
{
titleTime
=
[
NSString
stringWithFormat
:
@"%dmins %ds"
,[
titleTime
intValue
]
/
60
,[
titleTime
intValue
]
%
60
];
}
[
titleTimeArray1
addObject
:
titleTime
];
}
NSInteger
vvv
=
self
.
playerView
.
totalTime
;
[
self
.
progressBarView
progressBarTimeArray
:
timeArray
Totaltime
:
vvv
];
//
// if(itemTitleArray.count > 1){
// _timeScrollView = [[UIScrollView alloc] init];
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment