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
8aaa0e53
Commit
8aaa0e53
authored
Jul 05, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理 一键登录 在模拟器 和 真机上的不同
parent
495fe4f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
7 deletions
+27
-7
YHOneKeyLoginManager.swift
...sses/Modules/AutoLogin(一键登录)/M/YHOneKeyLoginManager.swift
+12
-5
YHAddFriendCardCell.swift
...Classes/Modules/Community(社区)/V/YHAddFriendCardCell.swift
+15
-2
No files found.
galaxy/galaxy/Classes/Modules/AutoLogin(一键登录)/M/YHOneKeyLoginManager.swift
View file @
8aaa0e53
...
...
@@ -355,6 +355,10 @@ extension YHOneKeyLoginManager {
attributes
:
attributes
,
context
:
nil
)
.
size
#if targetEnvironment(simulator)
// 这段代码只会在模拟器上编译
let
textHeight
=
ceill
(
Float80
(
boundingSize
.
height
))
model
.
privacyAlertPrivacyContentFrameBlock
=
{
...
...
@@ -362,13 +366,16 @@ extension YHOneKeyLoginManager {
return
CGRectMake
(
21.0
,
15.0
+
24.0
+
33.0
,
alertContentWidth
,
CGFloat
(
textHeight
))
}
currentTop
=
currentTop
+
33.0
+
Double
(
textHeight
)
#if targetEnvironment(simulator)
// 这段代码只会在模拟器上编译
print
(
"This is running on a simulator."
)
#else
// 这段代码只会在真机上编译
print
(
"This is running on a physical device."
)
let
textHeight
=
ceill
(
boundingSize
.
height
)
model
.
privacyAlertPrivacyContentFrameBlock
=
{
screenSize
,
superViewSize
,
frame
in
return
CGRectMake
(
21.0
,
15.0
+
24.0
+
33.0
,
alertContentWidth
,
CGFloat
(
textHeight
))
}
currentTop
=
currentTop
+
33.0
+
Double
(
textHeight
)
model
.
privacyAlertButtonFrameBlock
=
{
screenSize
,
superViewSize
,
frame
in
return
CGRectMake
(
16
,
15
+
24
+
33
+
textHeight
+
36.0
,
alertBtnWith
,
alertBtnHeight
)
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHAddFriendCardCell.swift
View file @
8aaa0e53
...
...
@@ -301,8 +301,21 @@ class YHAddFriendCardCell: UITableViewCell {
attributes
:
attributes
,
context
:
nil
)
.
size
let
textHeight
=
ceill
(
Float80
(
boundingSize
.
height
))
return
CGFloat
(
textHeight
)
#if targetEnvironment(simulator)
// 这段代码只会在模拟器上编译
print
(
"This is running on a simulator."
)
let
textHeight
:
CGFloat
=
CGFloat
(
ceill
(
Float80
(
CGFloat
(
boundingSize
.
height
))))
return
textHeight
#else
// 这段代码只会在真机上编译
print
(
"This is running on a physical device."
)
let
textHeight
:
CGFloat
=
ceill
(
CGFloat
(
boundingSize
.
height
))
return
textHeight
#endif
return
0.0
}
}
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