Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PhoneManager
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yang
PhoneManager
Commits
7e531da8
Commit
7e531da8
authored
Apr 11, 2025
by
CZ1004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页问题
parent
939708d2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
231 additions
and
221 deletions
+231
-221
CompressCompletedLight.json
...mation/CompressCompletedLight/CompressCompletedLight.json
+1
-1
CompressCompletedLightOld.json
...ion/CompressCompletedLight/CompressCompletedLightOld.json
+1
-0
ChargeInfoSettingView.swift
...ger/Class/Session/Charge/View/ChargeInfoSettingView.swift
+1
-1
HomePhotosDetailViewController.swift
...sion/Home/Controller/HomePhotosDetailViewController.swift
+90
-88
HomeVideoDetailController.swift
...s/Session/Home/Controller/HomeVideoDetailController.swift
+101
-117
HomeViewController.swift
...er/Class/Session/Home/Controller/HomeViewController.swift
+5
-0
VideoDetaiNavView.swift
PhoneManager/Class/Session/Home/View/VideoDetaiNavView.swift
+1
-1
PMShowImgVideoController.swift
...nager/Class/Session/Secret/PMShowImgVideoController.swift
+0
-13
PhotoAndVideoMananger.swift
...l/Class/PhotoAndVideoMananger/PhotoAndVideoMananger.swift
+31
-0
No files found.
PhoneManager/Class/Resource/Animation/CompressCompletedLight/CompressCompletedLight.json
View file @
7e531da8
This diff is collapsed.
Click to expand it.
PhoneManager/Class/Resource/Animation/CompressCompletedLight/CompressCompletedLightOld.json
0 → 100644
View file @
7e531da8
This diff is collapsed.
Click to expand it.
PhoneManager/Class/Session/Charge/View/ChargeInfoSettingView.swift
View file @
7e531da8
...
...
@@ -55,7 +55,7 @@ class ChargeInfoSettingView:UIView {
// 存储到userDefaults
UserDefaults
.
standard
.
set
(
String
(
flag
!
),
forKey
:
"chargePicInfo"
)
let
alert
=
UIAlertController
(
title
:
nil
,
message
:
"
完成
!"
,
preferredStyle
:
.
alert
)
let
alert
=
UIAlertController
(
title
:
nil
,
message
:
"
Done
!"
,
preferredStyle
:
.
alert
)
self
.
responderViewController
()?
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
// 2 秒后关闭弹窗
...
...
PhoneManager/Class/Session/Home/Controller/HomePhotosDetailViewController.swift
View file @
7e531da8
This diff is collapsed.
Click to expand it.
PhoneManager/Class/Session/Home/Controller/HomeVideoDetailController.swift
View file @
7e531da8
This diff is collapsed.
Click to expand it.
PhoneManager/Class/Session/Home/Controller/HomeViewController.swift
View file @
7e531da8
...
...
@@ -60,6 +60,11 @@ class HomeViewController:BaseViewController {
if
otherItemRow
==
2
||
otherItemRow
==
4
{
DispatchQueue
.
main
.
async
{
let
vc
:
HomePhotosDetailViewController
=
HomePhotosDetailViewController
(
model
:
model
)
if
otherItemRow
==
2
{
vc
.
mediaType
=
.
screenshots
}
else
{
vc
.
mediaType
=
.
Other
}
vc
.
dealData
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
...
...
PhoneManager/Class/Session/Home/View/VideoDetaiNavView.swift
View file @
7e531da8
...
...
@@ -54,7 +54,7 @@ class VideoDetaiNavView : UIView {
self
.
addSubview
(
self
.
seletedAllBtn
)
self
.
seletedAllBtn
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
.
offset
(
-
15
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
23
)
make
.
centerY
.
equalTo
(
self
.
backButton
.
snp
.
centerY
)
}
...
...
PhoneManager/Class/Session/Secret/PMShowImgVideoController.swift
View file @
7e531da8
...
...
@@ -231,19 +231,6 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
completion
(
nil
,
NSError
(
domain
:
"com.example.error"
,
code
:
1
,
userInfo
:
[
NSLocalizedDescriptionKey
:
"未找到对应视频资源"
]))
return
}
PHPhotoLibrary
.
requestAuthorization
{
status
in
switch
status
{
case
.
authorized
:
print
(
"Access granted"
)
case
.
denied
,
.
restricted
:
print
(
"Access denied"
)
case
.
notDetermined
:
print
(
"Access not determined"
)
@unknown
default
:
print
(
"Unhandled authorization status"
)
}
}
let
options
=
PHVideoRequestOptions
()
options
.
isNetworkAccessAllowed
=
true
// 允许从网络下载
...
...
PhoneManager/Class/Tool/Class/PhotoAndVideoMananger/PhotoAndVideoMananger.swift
View file @
7e531da8
...
...
@@ -799,6 +799,37 @@ class PhotoAndVideoMananger {
// MARK: - 处理截图数据-------------------------------------------------------
/// 获取视频第一帧
/// - Parameters:
/// - ident: 视频的标识
/// - finished: 完成回调
func
getVideoImageByIdent
(
ident
:
String
,
finished
:
@escaping
(
UIImage
)
->
Void
,
errorHandler
:
@escaping
()
->
Void
){
// 定义请求选项来获取视频的第一帧
let
options
=
PHImageRequestOptions
()
// 获取当前版本的照片或视频
options
.
version
=
.
current
// 尽可能快地提供结果
options
.
deliveryMode
=
.
opportunistic
// 允许从iCloud请求
options
.
isNetworkAccessAllowed
=
true
// 异步请求
options
.
isSynchronous
=
true
// 从 PHAsset 获取 AVAsset
if
let
videoAsset
=
PhotoAndVideoMananger
.
mananger
.
getPHAsssetwithID
(
ids
:
[
ident
]){
// 使用requestImageForAsset方法请求视频的第一帧图片
PHImageManager
.
default
()
.
requestImage
(
for
:
videoAsset
,
targetSize
:
CGSize
(
width
:
400
,
height
:
400
),
contentMode
:
PHImageContentMode
.
aspectFit
,
options
:
options
)
{
image
,
_
in
// 处理获取到的图片
if
let
thumbnailImage
=
image
{
// 使用获取到的图片,例如显示在UIImageView上
finished
(
thumbnailImage
)
}
else
{
errorHandler
()
}
}
}
}
}
...
...
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