Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
abd1cff9
Commit
abd1cff9
authored
Aug 14, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实验
parent
c4c26a42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
34 deletions
+34
-34
YHPictureReviewManager.swift
.../Modules/PictureReview(图片预览)/YHPictureReviewManager.swift
+34
-34
No files found.
galaxy/galaxy/Classes/Modules/PictureReview(图片预览)/YHPictureReviewManager.swift
View file @
abd1cff9
...
@@ -26,40 +26,40 @@ class YHPictureReviewManager: NSObject {
...
@@ -26,40 +26,40 @@ class YHPictureReviewManager: NSObject {
extension
YHPictureReviewManager
{
extension
YHPictureReviewManager
{
func
showNetWorkPicturs
(
curIndex
:
Int
,
arrPicturs
:[
String
])
{
func
showNetWorkPicturs
(
curIndex
:
Int
,
arrPicturs
:[
String
])
{
guard
curIndex
>
-
1
,
arrPicturs
.
count
>
0
else
{
return
}
//
guard curIndex > -1,arrPicturs.count > 0 else { return }
//
self
.
curIndex
=
curIndex
//
self.curIndex = curIndex
self
.
arrPics
=
arrPicturs
//
self.arrPics = arrPicturs
//
//
let
browser
=
JXPhotoBrowser
()
//
let browser = JXPhotoBrowser()
browser
.
numberOfItems
=
{
//
browser.numberOfItems = {
self
.
arrPics
.
count
//
self.arrPics.count
}
//
}
//
browser
.
reloadCellAtIndex
=
{
context
in
//
browser.reloadCellAtIndex = { context in
if
context
.
index
>=
self
.
arrPics
.
count
{
//
if context.index >= self.arrPics.count {
return
//
return
}
//
}
let
string
=
self
.
arrPics
[
context
.
index
]
//
let string = self.arrPics[context.index]
guard
string
.
count
>
0
,
let
url
=
URL
(
string
:
string
)
else
{
return
}
//
guard string.count > 0,let url = URL(string: string) else { return }
let
browserCell
=
context
.
cell
as?
JXPhotoBrowserImageCell
//
let browserCell = context.cell as? JXPhotoBrowserImageCell
browserCell
?
.
index
=
context
.
index
//
browserCell?.index = context.index
let
placeholder
=
UIImage
(
named
:
"global_default_image"
)
//
let placeholder = UIImage(named: "global_default_image")
browserCell
?
.
imageView
.
sd_setImage
(
with
:
url
,
placeholderImage
:
placeholder
,
options
:
[],
completed
:
{
(
_
,
_
,
_
,
_
)
in
//
browserCell?.imageView.sd_setImage(with: url, placeholderImage: placeholder, options: [], completed: { (_, _, _, _) in
browserCell
?
.
setNeedsLayout
()
//
browserCell?.setNeedsLayout()
})
//
})
//
// 添加长按事件
//
// 添加长按事件
browserCell
?
.
longPressedAction
=
{
cell
,
_
in
//
browserCell?.longPressedAction = { cell, _ in
self
.
longPress
(
cell
:
cell
)
//
self.longPress(cell: cell)
}
//
}
}
//
}
//
// 数字样式的页码指示器
//
// 数字样式的页码指示器
browser
.
pageIndicator
=
JXPhotoBrowserNumberPageIndicator
()
//
browser.pageIndicator = JXPhotoBrowserNumberPageIndicator()
browser
.
pageIndex
=
self
.
curIndex
//
browser.pageIndex = self.curIndex
browser
.
show
()
//
browser.show()
}
}
}
}
...
...
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