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
da73d624
Commit
da73d624
authored
Jul 19, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tabbar 上的shareView
parent
a0dbf94b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
6 deletions
+68
-6
Podfile
galaxy/Podfile
+2
-0
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+1
-1
YHTabBarViewController.swift
galaxy/galaxy/Classes/Base/C/YHTabBarViewController.swift
+44
-1
YHStatusAdvantageVC.swift
...laxy/Classes/Modules/Home(首页)/C/YHStatusAdvantageVC.swift
+1
-0
YHMessageBellView.swift
...galaxy/Classes/Modules/Home(首页)/V/YHMessageBellView.swift
+17
-4
YhConstant.swift
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
+3
-0
No files found.
galaxy/Podfile
View file @
da73d624
...
...
@@ -5,6 +5,8 @@ platform :ios, '13.0'
target
'galaxy'
do
use_frameworks!
#与H5进行交互
pod
"dsBridge"
,
'3.0.6'
#网络检查
pod
'ReachabilitySwift'
,
'5.0.0'
#键盘处理
...
...
galaxy/galaxy/AppDelegate.swift
View file @
da73d624
...
...
@@ -20,7 +20,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
Thread
.
sleep
(
forTimeInterval
:
0.
2
5
)
// 应产品同学Nick要求 启动页时间展示长点
Thread
.
sleep
(
forTimeInterval
:
0.5
)
// 应产品同学Nick要求 启动页时间展示长点
setupAudionConfig
()
...
...
galaxy/galaxy/Classes/Base/C/YHTabBarViewController.swift
View file @
da73d624
...
...
@@ -16,6 +16,20 @@ class YHTabBarViewController: ESTabBarController {
return
model
}()
lazy
var
testView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
purple
view
.
isHidden
=
true
return
view
}()
override
func
viewDidLayoutSubviews
()
{
super
.
viewDidLayoutSubviews
()
testView
.
frame
=
self
.
tabBar
.
frame
testView
.
bringSubviewToFront
(
testView
)
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
handleTabBarLine
()
...
...
@@ -23,12 +37,18 @@ class YHTabBarViewController: ESTabBarController {
if
YHLoginManager
.
shared
.
isLogin
()
{
reportDeviceInfo
()
}
testView
.
frame
=
self
.
tabBar
.
frame
view
.
addSubview
(
testView
)
}
func
addObservers
()
{
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
loginSuccess
)
,
name
:
YhConstant
.
YhNotification
.
didLoginSuccessNotifiction
,
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
logoutSuccess
)
,
name
:
YhConstant
.
YhNotification
.
didLogoutSuccessNotifiction
,
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
clearAllUnreadBadge
)
,
name
:
YhConstant
.
YhNotification
.
didMarkAllMessagesReadedNotifiction
,
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
changeShareViewStatus(_ :)
)
,
name
:
YhConstant
.
YhNotification
.
changeShareViewStatusOnTabBarNotifiction
,
object
:
nil
)
}
}
...
...
@@ -50,6 +70,29 @@ extension YHTabBarViewController {
printLog
(
"登出成功"
)
}
@objc
func
changeShareViewStatus
(
_
notification
:
Notification
)
{
if
let
dic
=
notification
.
object
as?
[
String
:
Any
]
{
let
show
=
dic
[
"show"
]
as?
Int
??
0
if
show
==
0
{
testView
.
isHidden
=
true
testView
.
layer
.
opacity
=
1.0
UIView
.
animate
(
withDuration
:
0.25
,
delay
:
0
,
options
:
[
.
curveEaseOut
])
{
self
.
testView
.
layer
.
opacity
=
0.0
}
completion
:
{
finish
in
}
}
else
if
show
==
1
{
self
.
testView
.
isHidden
=
false
self
.
testView
.
layer
.
opacity
=
0.0
UIView
.
animate
(
withDuration
:
0.25
,
delay
:
0
,
options
:
[
.
curveEaseIn
])
{
self
.
testView
.
layer
.
opacity
=
1.0
}
completion
:
{
finish
in
}
}
else
{
testView
.
isHidden
=
true
}
}
}
@objc
func
clearAllUnreadBadge
()
{
DispatchQueue
.
main
.
async
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHStatusAdvantageVC.swift
View file @
da73d624
...
...
@@ -69,6 +69,7 @@ private extension YHStatusAdvantageVC {
webview
=
WKWebView
(
frame
:
CGRect
(
x
:
0
,
y
:
statusHeight
+
navHeight
!
,
width
:
self
.
view
.
frame
.
width
,
height
:
self
.
view
.
frame
.
height
-
statusHeight
-
navHeight
!
-
59
-
k_Height_safeAreaInsetsBottom
()))
webview
.
navigationDelegate
=
self
webview
.
scrollView
.
contentInsetAdjustmentBehavior
=
.
never
webview
.
scrollView
.
bounces
=
false
// 创建网址
let
url
=
NSURL
(
string
:
url
)
// 创建请求
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHMessageBellView.swift
View file @
da73d624
...
...
@@ -13,6 +13,9 @@ class YHMessageBellView: UIView {
static
let
width
=
53.0
static
let
height
=
36.0
var
testNumber
:
Int
=
0
//for test hjl
var
unreadCount
:
Int
=
0
{
didSet
{
self
.
unreadLabel
.
isHidden
=
(
self
.
unreadCount
<=
0
)
...
...
@@ -92,9 +95,19 @@ class YHMessageBellView: UIView {
return
}
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
clickHomeMsgNotifiction
,
object
:
nil
)
let
vc
=
YHMessageListVC
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
// NotificationCenter.default.post(name: YhConstant.YhNotification.clickHomeMsgNotifiction, object: nil)
// let vc = YHMessageListVC()
// UIViewController.current?.navigationController?.pushViewController(vc)
//todo: for test hjl
testNumber
=
testNumber
+
1
if
testNumber
%
2
==
0
{
let
dic
=
[
"show"
:
0
,
"other"
:
"https://www.baidu.com"
]
as
[
String
:
Any
]
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
changeShareViewStatusOnTabBarNotifiction
,
object
:
dic
)
}
else
{
let
dic
=
[
"show"
:
1
,
"other"
:
"https://www.baidu.com"
]
as
[
String
:
Any
]
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
changeShareViewStatusOnTabBarNotifiction
,
object
:
dic
)
}
}
}
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
View file @
da73d624
...
...
@@ -262,6 +262,9 @@ extension YhConstant {
// 去看一看点击后开始匹配用户
public
static
let
didLookPeopleSuccessNotifiction
=
Notification
.
Name
(
rawValue
:
"com.yinhe.look.people.success"
)
// 改变底部tabbar上 分享View的展示状态
public
static
let
changeShareViewStatusOnTabBarNotifiction
=
Notification
.
Name
(
rawValue
:
"com.yinhe.change.shareView.status"
)
}
}
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