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
395710ce
Commit
395710ce
authored
Nov 30, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通用分享弹窗
parent
82e140ce
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
430 additions
and
0 deletions
+430
-0
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
YHLifeViewController.swift
...es/Modules/Home(首页)/Life(生活)/C/YHLifeViewController.swift
+1
-0
YHShareAlertView.swift
...es/Modules/LivestreamSales(直播销售)/V/YHShareAlertView.swift
+337
-0
Contents.json
...itation_with_gifts_share_bg_bottom.imageset/Contents.json
+22
-0
invitation_with_gifts_share_bg_bottom@2x.png
...tom.imageset/invitation_with_gifts_share_bg_bottom@2x.png
+0
-0
invitation_with_gifts_share_bg_bottom@3x.png
...tom.imageset/invitation_with_gifts_share_bg_bottom@3x.png
+0
-0
Contents.json
...r/invitation_with_gifts_share_link.imageset/Contents.json
+22
-0
invitation_with_gifts_share_link@2x.png
...are_link.imageset/invitation_with_gifts_share_link@2x.png
+0
-0
invitation_with_gifts_share_link@3x.png
...are_link.imageset/invitation_with_gifts_share_link@3x.png
+0
-0
Contents.json
...r/invitation_with_gifts_share_live.imageset/Contents.json
+22
-0
invitation_with_gifts_share_live@2x.png
...are_live.imageset/invitation_with_gifts_share_live@2x.png
+0
-0
invitation_with_gifts_share_live@3x.png
...are_live.imageset/invitation_with_gifts_share_live@3x.png
+0
-0
Contents.json
...r/invitation_with_gifts_share_save.imageset/Contents.json
+22
-0
invitation_with_gifts_share_save@2x.png
...are_save.imageset/invitation_with_gifts_share_save@2x.png
+0
-0
保存图片.png
...ationr/invitation_with_gifts_share_save.imageset/保存图片.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
395710ce
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
04013E3C2CF86BB5001A8E40
/* YHSelectMenuView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04013E3B2CF86BB5001A8E40
/* YHSelectMenuView.swift */
;
};
04013E3C2CF86BB5001A8E40
/* YHSelectMenuView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04013E3B2CF86BB5001A8E40
/* YHSelectMenuView.swift */
;
};
04013E3E2CF87F3A001A8E40
/* zhibo.json in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04013E3D2CF87F3A001A8E40
/* zhibo.json */
;
};
04013E3E2CF87F3A001A8E40
/* zhibo.json in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04013E3D2CF87F3A001A8E40
/* zhibo.json */
;
};
04013E402CF99505001A8E40
/* live.json in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04013E3F2CF99505001A8E40
/* live.json */
;
};
04013E402CF99505001A8E40
/* live.json in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04013E3F2CF99505001A8E40
/* live.json */
;
};
04013E422CFADF6B001A8E40
/* YHShareAlertView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04013E412CFADF6B001A8E40
/* YHShareAlertView.swift */
;
};
040450CF2CC8A0F400D1CFE5
/* YHResignDocumentMultiLineTipsCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040450CE2CC8A0F400D1CFE5
/* YHResignDocumentMultiLineTipsCell.swift */
;
};
040450CF2CC8A0F400D1CFE5
/* YHResignDocumentMultiLineTipsCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040450CE2CC8A0F400D1CFE5
/* YHResignDocumentMultiLineTipsCell.swift */
;
};
0408C3632BEC7C6900DB1E25
/* YHVideoPlayerControlView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0408C3622BEC7C6900DB1E25
/* YHVideoPlayerControlView.swift */
;
};
0408C3632BEC7C6900DB1E25
/* YHVideoPlayerControlView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0408C3622BEC7C6900DB1E25
/* YHVideoPlayerControlView.swift */
;
};
0409BEEB2C5B41D4003FCFD7
/* YHPrincipleProfileListCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0409BEEA2C5B41D4003FCFD7
/* YHPrincipleProfileListCell.swift */
;
};
0409BEEB2C5B41D4003FCFD7
/* YHPrincipleProfileListCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0409BEEA2C5B41D4003FCFD7
/* YHPrincipleProfileListCell.swift */
;
};
...
@@ -1082,6 +1083,7 @@
...
@@ -1082,6 +1083,7 @@
04013E3B2CF86BB5001A8E40
/* YHSelectMenuView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSelectMenuView.swift
;
sourceTree
=
"<group>"
;
};
04013E3B2CF86BB5001A8E40
/* YHSelectMenuView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSelectMenuView.swift
;
sourceTree
=
"<group>"
;
};
04013E3D2CF87F3A001A8E40
/* zhibo.json */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.json
;
path
=
zhibo.json
;
sourceTree
=
"<group>"
;
};
04013E3D2CF87F3A001A8E40
/* zhibo.json */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.json
;
path
=
zhibo.json
;
sourceTree
=
"<group>"
;
};
04013E3F2CF99505001A8E40
/* live.json */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.json
;
path
=
live.json
;
sourceTree
=
"<group>"
;
};
04013E3F2CF99505001A8E40
/* live.json */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.json
;
path
=
live.json
;
sourceTree
=
"<group>"
;
};
04013E412CFADF6B001A8E40
/* YHShareAlertView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHShareAlertView.swift
;
sourceTree
=
"<group>"
;
};
040450CE2CC8A0F400D1CFE5
/* YHResignDocumentMultiLineTipsCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignDocumentMultiLineTipsCell.swift
;
sourceTree
=
"<group>"
;
};
040450CE2CC8A0F400D1CFE5
/* YHResignDocumentMultiLineTipsCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignDocumentMultiLineTipsCell.swift
;
sourceTree
=
"<group>"
;
};
0408C3622BEC7C6900DB1E25
/* YHVideoPlayerControlView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHVideoPlayerControlView.swift
;
sourceTree
=
"<group>"
;
};
0408C3622BEC7C6900DB1E25
/* YHVideoPlayerControlView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHVideoPlayerControlView.swift
;
sourceTree
=
"<group>"
;
};
0409BEEA2C5B41D4003FCFD7
/* YHPrincipleProfileListCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPrincipleProfileListCell.swift
;
sourceTree
=
"<group>"
;
};
0409BEEA2C5B41D4003FCFD7
/* YHPrincipleProfileListCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPrincipleProfileListCell.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -2991,6 +2993,7 @@
...
@@ -2991,6 +2993,7 @@
04564D552CF4467B004456E4
/* YHPlayerTopBarView.swift */
,
04564D552CF4467B004456E4
/* YHPlayerTopBarView.swift */
,
04564D5E2CF565C7004456E4
/* YHInputBottomBar.swift */
,
04564D5E2CF565C7004456E4
/* YHInputBottomBar.swift */
,
04564D7D2CF8D03D004456E4
/* YHFloatingWindow.swift */
,
04564D7D2CF8D03D004456E4
/* YHFloatingWindow.swift */
,
04013E412CFADF6B001A8E40
/* YHShareAlertView.swift */
,
);
);
path
=
V
;
path
=
V
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -6223,6 +6226,7 @@
...
@@ -6223,6 +6226,7 @@
0408C3632BEC7C6900DB1E25
/* YHVideoPlayerControlView.swift in Sources */
,
0408C3632BEC7C6900DB1E25
/* YHVideoPlayerControlView.swift in Sources */
,
042B20DF2CEB6A8F00655093
/* YHSchemeViewModel.swift in Sources */
,
042B20DF2CEB6A8F00655093
/* YHSchemeViewModel.swift in Sources */
,
044F394C2CB806D0007CA277
/* YHVisaRenewalPayMethodUrlCell.swift in Sources */
,
044F394C2CB806D0007CA277
/* YHVisaRenewalPayMethodUrlCell.swift in Sources */
,
04013E422CFADF6B001A8E40
/* YHShareAlertView.swift in Sources */
,
A567E5B12BD7643D00D5D5A0
/* YHHomeCollectionViewCell.swift in Sources */
,
A567E5B12BD7643D00D5D5A0
/* YHHomeCollectionViewCell.swift in Sources */
,
A582B2432BB95E20009D098C
/* YHHKPlanCell.swift in Sources */
,
A582B2432BB95E20009D098C
/* YHHKPlanCell.swift in Sources */
,
04256DE62C7310BE00A37BA4
/* YHSelectApplicantGroupCell.swift in Sources */
,
04256DE62C7310BE00A37BA4
/* YHSelectApplicantGroupCell.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/Life(生活)/C/YHLifeViewController.swift
View file @
395710ce
...
@@ -273,6 +273,7 @@ extension YHLifeViewController: UICollectionViewDelegate, UICollectionViewDataSo
...
@@ -273,6 +273,7 @@ extension YHLifeViewController: UICollectionViewDelegate, UICollectionViewDataSo
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
//跳转直播 文哥代办
//跳转直播 文哥代办
YHShareAlertView
.
show
(
image
:
"http://gips3.baidu.com/it/u=3886271102,3123389489&fm=3028&app=3028&f=JPEG&fmt=auto?w=1280&h=960"
,
title
:
"12344"
,
subMessage
:
"12213243"
,
linkUrl
:
"https://www.baidu.com"
,
isLive
:
true
)
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/V/YHShareAlertView.swift
0 → 100644
View file @
395710ce
//
// YHShareAlertView.swift
// galaxy
//
// Created by EDY on 2024/11/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
AttributedString
import
Photos
class
YHShareAlertView
:
UIView
{
var
centerView
:
UIView
!
var
leftButton
:
YHShareButton
!
var
centerButton
:
YHShareButton
!
var
rightButton
:
YHShareButton
!
var
cannalButton
:
UIButton
!
var
tableView
:
UITableView
!
var
shareView
:
UIImageView
!
var
mainImageView
:
UIImageView
!
var
titleLabel
:
UILabel
!
var
messageLabel
:
UILabel
!
var
bottomView
:
UIImageView
!
var
bottomTitleLabel
:
UILabel
!
var
flagImageView
:
UIImageView
!
var
liveView
:
UIImageView
!
var
image
:
String
=
""
{
didSet
{
mainImageView
.
kf
.
setImage
(
with
:
URL
(
string
:
image
))
}
}
var
title
:
String
=
""
{
didSet
{
titleLabel
.
text
=
title
}
}
var
subMessage
:
String
=
""
{
didSet
{
messageLabel
.
text
=
subMessage
}
}
var
linkUrl
:
String
=
""
{
didSet
{
let
qrString
=
linkUrl
if
let
qrCode
=
qrString
.
generateQRCode
()
{
// 可以将qrCode设置为UIImageView的image属性来显示二维码
flagImageView
.
image
=
qrCode
}
}
}
var
isLive
:
Bool
=
false
{
didSet
{
liveView
.
isHidden
=
!
isLive
}
}
var
dataSource
:
[
String
]
=
[]
{
didSet
{
self
.
tableView
.
reloadData
()
}
}
var
selectItem
:
Int
=
10000
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
backgroundColor
=
UIColor
(
white
:
0.5
,
alpha
:
0.1
)
let
tap
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
handleTap
)
)
tap
.
delegate
=
self
addGestureRecognizer
(
tap
)
setView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
setView
()
{
backgroundColor
=
UIColor
(
hex
:
0x0000
,
alpha
:
0.5
)
centerView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
return
view
}()
addSubview
(
centerView
)
centerView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
height
.
equalTo
(
216
)
}
leftButton
=
{
let
button
=
YHShareButton
()
button
.
setContent
(
"invitation_with_gifts_share_center"
,
"微信"
)
button
.
addTarget
(
self
,
action
:
#selector(
wxClick
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
leftButton
)
leftButton
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
20
)
make
.
left
.
equalTo
(
42
)
make
.
height
.
equalTo
(
74
)
make
.
width
.
equalTo
(
52
)
}
centerButton
=
{
let
button
=
YHShareButton
()
button
.
setContent
(
"invitation_with_gifts_share_link"
,
"复制链接"
)
button
.
addTarget
(
self
,
action
:
#selector(
linkClick
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
centerButton
)
centerButton
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
20
)
make
.
centerX
.
equalToSuperview
()
make
.
height
.
equalTo
(
74
)
make
.
width
.
equalTo
(
52
)
}
rightButton
=
{
let
button
=
YHShareButton
()
button
.
setContent
(
"invitation_with_gifts_share_save"
,
"保存图片"
)
button
.
addTarget
(
self
,
action
:
#selector(
saveClick
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
rightButton
)
rightButton
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
42
)
make
.
height
.
equalTo
(
74
)
make
.
width
.
equalTo
(
52
)
}
cannalButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
UIColor
.
contentBkgColor
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"取消"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
.
mainTextColor
,
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
addTarget
(
self
,
action
:
#selector(
dismiss
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
cannalButton
)
cannalButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
top
.
equalTo
(
126
)
make
.
height
.
equalTo
(
44
)
make
.
right
.
equalTo
(
16
)
}
shareView
=
{
let
view
=
UIImageView
()
view
.
backgroundColor
=
.
white
return
view
}()
addSubview
(
shareView
)
shareView
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
height
.
equalTo
(
432
)
make
.
width
.
equalTo
(
271
)
make
.
bottom
.
equalTo
(
centerView
.
snp
.
top
)
.
offset
(
-
67
)
}
mainImageView
=
{
let
view
=
UIImageView
()
return
view
}()
shareView
.
addSubview
(
mainImageView
)
mainImageView
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
239
)
make
.
top
.
equalTo
(
16
)
}
titleLabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
mainTextColor
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
label
.
text
=
"香港事业星陪伴(7)"
return
label
}()
shareView
.
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
mainImageView
.
snp
.
bottom
)
.
offset
(
16
)
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
16
)
}
messageLabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
(
hex
:
0x6d788a
)
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
12
)
label
.
text
=
"香港入境计划申请到永居全流程服务)"
label
.
numberOfLines
=
2
return
label
}()
shareView
.
addSubview
(
messageLabel
)
messageLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
6
)
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
16
)
}
bottomView
=
{
let
view
=
UIImageView
()
view
.
image
=
UIImage
(
named
:
"invitation_with_gifts_share_bg_bottom"
)
return
view
}()
shareView
.
addSubview
(
bottomView
)
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
92
)
}
bottomTitleLabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
let
a
:
ASAttributedString
=
.
init
(
"银河"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"港生活
\n
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
brandMainColor
))
let
c
:
ASAttributedString
=
.
init
(
"美好新生活从这里开始"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
10
)),
.
foreground
(
UIColor
(
hex
:
0x8993a2
)))
label
.
attributed
.
text
=
a
+
b
+
c
return
label
}()
bottomView
.
addSubview
(
bottomTitleLabel
)
bottomTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
equalTo
(
-
20
)
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
}
flagImageView
=
{
let
view
=
UIImageView
()
return
view
}()
bottomView
.
addSubview
(
flagImageView
)
flagImageView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
16
)
make
.
width
.
height
.
equalTo
(
72
)
make
.
bottom
.
equalTo
(
-
16
)
}
liveView
=
{
let
view
=
UIImageView
()
view
.
image
=
UIImage
(
named
:
"invitation_with_gifts_share_live"
)
return
view
}()
mainImageView
.
addSubview
(
liveView
)
liveView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
10
)
make
.
bottom
.
equalTo
(
-
12
)
make
.
height
.
equalTo
(
16
)
make
.
width
.
equalTo
(
51
)
}
centerView
.
layoutIfNeeded
()
let
corner
=
UIRectCorner
(
rawValue
:
UIRectCorner
.
topLeft
.
rawValue
|
UIRectCorner
.
topRight
.
rawValue
)
let
path
=
UIBezierPath
(
roundedRect
:
bounds
,
byRoundingCorners
:
corner
,
cornerRadii
:
CGSizeMake
(
kCornerRadius6
,
kCornerRadius6
))
let
layer
=
CAShapeLayer
()
layer
.
frame
=
centerView
.
bounds
layer
.
path
=
path
.
cgPath
centerView
.
layer
.
mask
=
layer
}
@objc
private
func
handleTap
(
_
sender
:
AnyObject
?)
{
dismiss
()
}
static
func
show
(
image
:
String
=
""
,
title
:
String
=
""
,
subMessage
:
String
=
""
,
linkUrl
:
String
=
""
,
isLive
:
Bool
=
false
)
{
let
view
=
YHShareAlertView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
KScreenHeight
))
view
.
image
=
image
view
.
title
=
title
view
.
subMessage
=
subMessage
view
.
linkUrl
=
linkUrl
view
.
isLive
=
isLive
let
window
=
UIApplication
.
shared
.
yhKeyWindow
()
window
?
.
addSubview
(
view
)
}
@objc
func
dismiss
()
{
removeFromSuperview
()
}
@objc
func
saveClick
()
{
guard
let
combinedImage
=
combinedImageFrom
(
imageView
:
shareView
)
else
{
return
}
saveImageToPhotosAlbum
(
image
:
combinedImage
)
}
@objc
func
linkClick
()
{
let
textToCopy
=
linkUrl
UIPasteboard
.
general
.
string
=
textToCopy
YHHUD
.
flash
(
message
:
"复制成功"
)
}
@objc
func
wxClick
()
{
YHShareManager
.
shared
.
sendLinkContent
(
"香港身份规划专属礼包,限时领取!"
,
"1000元折扣福利券,资深银河规划专家1V1评估方案"
,
UIImage
(
named
:
"invitation_with_gifts_share_other"
)
??
UIImage
(),
link
:
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge.html#/evaluation?channel=lkhtj-app&customer_id=
\(
YHLoginManager
.
shared
.
userModel
?
.
id
??
""
)
&scene_id=30"
)
}
func
saveImageToPhotosAlbum
(
image
:
UIImage
)
{
// 确保应用有权访问相册
PHPhotoLibrary
.
requestAuthorization
{
status
in
if
status
==
.
authorized
{
// 保存图片到相册
DispatchQueue
.
main
.
async
{
UIImageWriteToSavedPhotosAlbum
(
image
,
nil
,
nil
,
nil
)
YHHUD
.
flash
(
message
:
"保存成功"
)
}
}
else
{
DispatchQueue
.
main
.
async
{
YHHUD
.
flash
(
message
:
"保存失败,请检查系统权限"
)
}
}
}
}
func
combinedImageFrom
(
imageView
:
UIImageView
)
->
UIImage
?
{
UIGraphicsBeginImageContextWithOptions
(
imageView
.
bounds
.
size
,
false
,
0.0
)
// 首先绘制 imageView 的内容
imageView
.
layer
.
render
(
in
:
UIGraphicsGetCurrentContext
()
!
)
// 获取合成后的图像
let
combinedImage
=
UIGraphicsGetImageFromCurrentImageContext
()
// 结束绘图上下文
UIGraphicsEndImageContext
()
return
combinedImage
}
}
extension
YHShareAlertView
:
UIGestureRecognizerDelegate
{
func
gestureRecognizer
(
_
gestureRecognizer
:
UIGestureRecognizer
,
shouldReceive
touch
:
UITouch
)
->
Bool
{
if
touch
.
view
==
self
{
return
true
}
return
false
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_bg_bottom.imageset/Contents.json
0 → 100644
View file @
395710ce
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"invitation_with_gifts_share_bg_bottom@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"invitation_with_gifts_share_bg_bottom@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_bg_bottom.imageset/invitation_with_gifts_share_bg_bottom@2x.png
0 → 100644
View file @
395710ce
128 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_bg_bottom.imageset/invitation_with_gifts_share_bg_bottom@3x.png
0 → 100644
View file @
395710ce
271 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_link.imageset/Contents.json
0 → 100644
View file @
395710ce
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"invitation_with_gifts_share_link@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"invitation_with_gifts_share_link@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_link.imageset/invitation_with_gifts_share_link@2x.png
0 → 100644
View file @
395710ce
2.5 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_link.imageset/invitation_with_gifts_share_link@3x.png
0 → 100644
View file @
395710ce
3.58 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_live.imageset/Contents.json
0 → 100644
View file @
395710ce
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"invitation_with_gifts_share_live@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"invitation_with_gifts_share_live@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_live.imageset/invitation_with_gifts_share_live@2x.png
0 → 100644
View file @
395710ce
1.55 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_live.imageset/invitation_with_gifts_share_live@3x.png
0 → 100644
View file @
395710ce
2.19 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_save.imageset/Contents.json
0 → 100644
View file @
395710ce
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"invitation_with_gifts_share_save@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"保存图片.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_save.imageset/invitation_with_gifts_share_save@2x.png
0 → 100644
View file @
395710ce
1.95 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Invitationr/invitation_with_gifts_share_save.imageset/保存图片.png
0 → 100644
View file @
395710ce
1.08 KB
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