Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
iOSTeam
/
Majiabao
/
TealiveModule
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
97c9302f
authored
Nov 20, 2024
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
如果手机没有安装微信。则隐藏微信
parent
ca022a7e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
Module/GDLoginAndRegistModule/GDLoginAndRegistModule/Features/Login/LoginViewController.swift
Module/GDLoginAndRegistModule/GDLoginAndRegistModule/Features/Login/LoginViewController.swift
View file @
97c9302f
...
...
@@ -534,6 +534,8 @@ class LoginViewController: BaseViewController {
// } else {
// visitorBtn.isHidden = true
if
let
wechatOpenUrl
=
URL
(
string
:
"weixin://"
),
UIApplication
.
shared
.
canOpenURL
(
wechatOpenUrl
)
==
true
{
wechatBtn
.
isHidden
=
false
qqBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
size
.
equalTo
(
60
)
make
.
centerX
.
equalToSuperview
()
...
...
@@ -551,6 +553,22 @@ class LoginViewController: BaseViewController {
make
.
left
.
equalTo
(
qqBtn
.
snp
.
right
)
.
offset
(
20
)
make
.
bottom
.
equalTo
(
qqBtn
)
}
}
else
{
wechatBtn
.
isHidden
=
true
qqBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
size
.
equalTo
(
60
)
make
.
centerX
.
equalToSuperview
()
.
offset
(
-
60
)
make
.
bottom
.
equalTo
(
bottomLayoutGuide
.
snp
.
top
)
.
offset
(
-
50
)
}
appleBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
size
.
equalTo
(
60
)
make
.
centerX
.
equalToSuperview
()
.
offset
(
60
)
make
.
bottom
.
equalTo
(
qqBtn
)
}
}
// }
}
else
{
...
...
@@ -576,6 +594,10 @@ class LoginViewController: BaseViewController {
// }
// } else {
// visitorBtn.isHidden = true
if
let
wechatOpenUrl
=
URL
(
string
:
"weixin://"
),
UIApplication
.
shared
.
canOpenURL
(
wechatOpenUrl
)
==
true
{
wechatBtn
.
isHidden
=
false
qqBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
size
.
equalTo
(
60
)
make
.
centerX
.
equalToSuperview
()
.
offset
(
60
)
...
...
@@ -587,6 +609,16 @@ class LoginViewController: BaseViewController {
make
.
centerX
.
equalToSuperview
()
.
offset
(
-
60
)
make
.
bottom
.
equalTo
(
qqBtn
)
}
}
else
{
wechatBtn
.
isHidden
=
true
qqBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
size
.
equalTo
(
60
)
make
.
centerX
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
bottomLayoutGuide
.
snp
.
top
)
.
offset
(
-
50
)
}
}
// }
}
...
...
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