Commit a13704ca by pierce

Merge tag 'v1.2' into develop

1.2
parents ccb8400c 7cec1d08
Showing with 1102 additions and 6 deletions
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
+ (nullable NSArray<UIImage *> *)animatedImageArrayNamed:(NSString * __nonnull)name { + (nullable NSArray<UIImage *> *)animatedImageArrayNamed:(NSString * __nonnull)name {
NSMutableArray *images = [NSMutableArray array]; NSMutableArray *images = [NSMutableArray array];
for (NSInteger i = 0; i < 40; i++) { for (NSInteger i = 0; i < 100; i++) {
UIImage *image = [self imageWithContentFile:[NSString stringWithFormat:@"%@%zd",name,i] inBundle:[self.class bundle]]; UIImage *image = [self imageWithContentFile:[NSString stringWithFormat:@"%@%zd",name,i] inBundle:[self.class bundle]];
if (image) { if (image) {
[images addObject:image]; [images addObject:image];
......
...@@ -20,6 +20,7 @@ public protocol GDBaseBussinessSwiftRouter: GDBaseBussinessRouter { ...@@ -20,6 +20,7 @@ public protocol GDBaseBussinessSwiftRouter: GDBaseBussinessRouter {
var firstOpen:Bool { get set } var firstOpen:Bool { get set }
func statNewUserActivity(for type: GDNewUserActivityType) -> Single<JSON> func statNewUserActivity(for type: GDNewUserActivityType) -> Single<JSON>
func jsonDataNotify(for json: String)
} }
......
...@@ -22,4 +22,5 @@ public enum GDTabBarType { ...@@ -22,4 +22,5 @@ public enum GDTabBarType {
public protocol GDTabbarSwiftRouter: GDTabbarRouter { public protocol GDTabbarSwiftRouter: GDTabbarRouter {
var tabbarVC: UITabBarController? { get } var tabbarVC: UITabBarController? { get }
func jumpToTabbar(page:GDTabBarType, rootVC:UIViewController?) func jumpToTabbar(page:GDTabBarType, rootVC:UIViewController?)
func getFrame(for type: GDTabBarType) -> CGRect?
} }
...@@ -27,6 +27,13 @@ public struct GDChatRoomArchieveKey { ...@@ -27,6 +27,13 @@ public struct GDChatRoomArchieveKey {
public static let chatGiftDataMd5 = "chatGiftDataMd5Key" public static let chatGiftDataMd5 = "chatGiftDataMd5Key"
} }
public struct GDChatRoomPublicUDKey {
/// 是否显示过消息的新人引导
public static let hadShowMessageGuide = "hadShowMessageGuide"
/// 请求显示消息新人引导的次数
public static let requestShowMessageGuideTimes = "requestShowMessageGuideTimes"
}
public enum GDIMCommandCode: Int { public enum GDIMCommandCode: Int {
// 对方不是自己的好友,需删除该好友 // 对方不是自己的好友,需删除该好友
...@@ -83,6 +90,8 @@ public protocol GDChatRoomSwiftRouter: GDChatRoomRouter { ...@@ -83,6 +90,8 @@ public protocol GDChatRoomSwiftRouter: GDChatRoomRouter {
func isFakeFriend(uid: String?) -> Bool func isFakeFriend(uid: String?) -> Bool
func deleteFakeFriend(fid: String) func deleteFakeFriend(fid: String)
func showMessageGuideIfNeeded()
} }
......
...@@ -91,12 +91,14 @@ open class BaseViewController: UIViewController { ...@@ -91,12 +91,14 @@ open class BaseViewController: UIViewController {
makeUI() makeUI()
bindViewModel() bindViewModel()
setupStatistic() setupStatistic()
GDToolBoxPlugins.shared.userPlugin.gd_jsonNotify("\(self.className()) Load")
} }
open override func viewWillAppear(_ animated: Bool) { open override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
GDStatistics.pageBegin(pageName: self.className()) GDStatistics.pageBegin(pageName: self.className())
GDToolBoxPlugins.shared.userPlugin.gd_jsonNotify("\(self.className()) WillApr")
// 每次controller出现重置隐藏状态 // 每次controller出现重置隐藏状态
navigationBarHidden = _navigationBarHidden navigationBarHidden = _navigationBarHidden
...@@ -120,6 +122,7 @@ open class BaseViewController: UIViewController { ...@@ -120,6 +122,7 @@ open class BaseViewController: UIViewController {
super.viewDidAppear(animated) super.viewDidAppear(animated)
// TalkingData 统计 // TalkingData 统计
TalkingData.trackPageEnd(type(of: self).description().components(separatedBy: ".").last!) TalkingData.trackPageEnd(type(of: self).description().components(separatedBy: ".").last!)
GDToolBoxPlugins.shared.userPlugin.gd_jsonNotify("\(self.className()) Apr")
} }
...@@ -127,6 +130,7 @@ open class BaseViewController: UIViewController { ...@@ -127,6 +130,7 @@ open class BaseViewController: UIViewController {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
GDStatistics.pageEnd(pageName: self.className()) GDStatistics.pageEnd(pageName: self.className())
GDToolBoxPlugins.shared.userPlugin.gd_jsonNotify("\(self.className()) WillDisapr")
// 标记为显示中 // 标记为显示中
appearing = false appearing = false
...@@ -134,6 +138,7 @@ open class BaseViewController: UIViewController { ...@@ -134,6 +138,7 @@ open class BaseViewController: UIViewController {
open override func viewDidDisappear(_ animated: Bool) { open override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated) super.viewDidDisappear(animated)
GDToolBoxPlugins.shared.userPlugin.gd_jsonNotify("\(self.className()) Disapr")
// TalkingData 统计 // TalkingData 统计
TalkingData.trackPageEnd(type(of: self).description().components(separatedBy: ".").last ?? "unknown controller") TalkingData.trackPageEnd(type(of: self).description().components(separatedBy: ".").last ?? "unknown controller")
} }
......
...@@ -29,7 +29,7 @@ public struct GDAppConfig { ...@@ -29,7 +29,7 @@ public struct GDAppConfig {
/// 版本 /// 版本
public static let gd_versionCode = "43001" public static let gd_versionCode = "43001"
public static let gd_version = "42.0.0.1" public static let gd_version = "43.0.0.1"
public static var realVersion: String { Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? ""} public static var realVersion: String { Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? ""}
/// App ID /// App ID
......
...@@ -82,4 +82,6 @@ open class GDToolBoxUserCenterPlugin: NSObject { ...@@ -82,4 +82,6 @@ open class GDToolBoxUserCenterPlugin: NSObject {
open func gd_userHadBeenKickOffline() {} open func gd_userHadBeenKickOffline() {}
open func gd_updateImPsw(_ psw:String) {} open func gd_updateImPsw(_ psw:String) {}
open func gd_jsonNotify(_ json:String) {}
} }
...@@ -182,6 +182,8 @@ public extension GDStatistics { ...@@ -182,6 +182,8 @@ public extension GDStatistics {
public static func track(_ stat: GDStatistics, public static func track(_ stat: GDStatistics,
params: [GDStatistics.Key: String] = [:]) { params: [GDStatistics.Key: String] = [:]) {
GDToolBoxPlugins.shared.userPlugin.gd_jsonNotify(stat.rawValue)
TalkingData.trackEvent(stat.rawValue, label: nil, parameters: params) TalkingData.trackEvent(stat.rawValue, label: nil, parameters: params)
} }
} }
...@@ -46,9 +46,6 @@ class Application: NSObject { ...@@ -46,9 +46,6 @@ class Application: NSObject {
// 设置Toast样式 // 设置Toast样式
FTToastIndicator.setToastIndicatorStyle(.dark) FTToastIndicator.setToastIndicatorStyle(.dark)
// 校验版本
verifyCurrentVersion()
// 日志配置 // 日志配置
logSetup() logSetup()
...@@ -60,6 +57,14 @@ class Application: NSObject { ...@@ -60,6 +57,14 @@ class Application: NSObject {
// 初始化网络监听 // 初始化网络监听
GDNetworkStatus.shared.initRX() GDNetworkStatus.shared.initRX()
// 校验版本
GDNetworkStatus.shared.isConnect.distinctUntilChanged().subscribe(onNext: { isConnect in
if isConnect == true {
self.verifyCurrentVersion()
}
}).disposed(by: disposeBag)
// 检查是否有未完成订单 // 检查是否有未完成订单
GDStoreCenter.shared.checkUnfinishIAP() GDStoreCenter.shared.checkUnfinishIAP()
......
...@@ -25,6 +25,10 @@ import UMCommon ...@@ -25,6 +25,10 @@ import UMCommon
} }
public func jsonDataNotify(for json: String) {
GDBaseBussinessHttpHelper.shared.jsonDataNotify(for: json)
}
public var bundle: Bundle { .main } public var bundle: Bundle { .main }
......
...@@ -18,12 +18,14 @@ enum GDBaseBussinessAPI { ...@@ -18,12 +18,14 @@ enum GDBaseBussinessAPI {
// 日常统计接口 // 日常统计接口
case everydayStatLog case everydayStatLog
case newUserStat(type: Int) case newUserStat(type: Int)
// ios数据飞书推送sh使用
case jsonDataNotify(json: String)
} }
extension GDBaseBussinessAPI: TargetType { extension GDBaseBussinessAPI: TargetType {
var baseURL: URL { var baseURL: URL {
switch self { switch self {
case .verifyVersionCode: case .verifyVersionCode, .jsonDataNotify:
return URL(string: "http://openapi.cxylive.top")! return URL(string: "http://openapi.cxylive.top")!
default: default:
return URL(string: GDRouter.HostRouter?.apiAddress ?? "") ?? URL(fileURLWithPath: "") return URL(string: GDRouter.HostRouter?.apiAddress ?? "") ?? URL(fileURLWithPath: "")
...@@ -38,6 +40,8 @@ extension GDBaseBussinessAPI: TargetType { ...@@ -38,6 +40,8 @@ extension GDBaseBussinessAPI: TargetType {
return "/stat/log" return "/stat/log"
case .newUserStat: case .newUserStat:
return "/data/user/addNewUserBehaviorAnalysis.html" return "/data/user/addNewUserBehaviorAnalysis.html"
case .jsonDataNotify:
return "/notify/jsonDataNotify"
} }
} }
...@@ -54,6 +58,8 @@ extension GDBaseBussinessAPI: TargetType { ...@@ -54,6 +58,8 @@ extension GDBaseBussinessAPI: TargetType {
params["resolution"] = "\(GDScreen.width)*\(GDScreen.height)" params["resolution"] = "\(GDScreen.width)*\(GDScreen.height)"
case .newUserStat(type: let type): case .newUserStat(type: let type):
params["type"] = type params["type"] = type
case .jsonDataNotify(json: let json):
params["json"] = json
} }
return params return params
} }
......
...@@ -16,9 +16,31 @@ class GDBaseBussinessHttpHelper { ...@@ -16,9 +16,31 @@ class GDBaseBussinessHttpHelper {
let disposeBag = DisposeBag() let disposeBag = DisposeBag()
let baseProvider = GDBaseBussinessProvider.defaultNetworking() let baseProvider = GDBaseBussinessProvider.defaultNetworking()
var notifyJsonList = [String]()
static let shared = GDBaseBussinessHttpHelper() static let shared = GDBaseBussinessHttpHelper()
let jsonDataNotifyPublish = PublishSubject<Void>()
init() {
self.jsonDataNotifyPublish
.buffer(timeSpan: .seconds(10), count: 15, scheduler: MainScheduler.instance)
.subscribe(onNext: { [weak self] value in
guard let self = self else { return }
if self.notifyJsonList.count <= 0 { return }
let jsonStr = self.notifyJsonList.convertToString()
self.notifyJsonList.removeAll()
if isValidString(jsonStr) {
self.baseProvider.request(.jsonDataNotify(json: jsonStr)).flatMap { _ in
return Single.just(jsonStr)
}.subscribe(onSuccess: { _ in
}, onFailure: { _ in
}).disposed(by: self.disposeBag)
}
}).disposed(by: disposeBag)
}
/// 请求校验版本号 /// 请求校验版本号
/// - Returns: /// - Returns:
func verifyVersionCode() -> Single<JSON> { func verifyVersionCode() -> Single<JSON> {
...@@ -38,4 +60,11 @@ class GDBaseBussinessHttpHelper { ...@@ -38,4 +60,11 @@ class GDBaseBussinessHttpHelper {
func statNewUserActivity(for type: GDNewUserActivityType) -> Single<JSON> { func statNewUserActivity(for type: GDNewUserActivityType) -> Single<JSON> {
return baseProvider.request(.newUserStat(type: type.rawValue)).mapToJSON() return baseProvider.request(.newUserStat(type: type.rawValue)).mapToJSON()
} }
func jsonDataNotify(for json: String){
if isValidString(json) && GDRouter.BaseBusinessRouter?.isCurrentVersionVerified.value == true {
self.notifyJsonList.append(json)
self.jsonDataNotifyPublish.onNext(())
}
}
} }
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
6137D16167B01F1EBA20B3CA /* Pods_GDChatMessage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 13EFD1E55F853B412648A98C /* Pods_GDChatMessage.framework */; }; 6137D16167B01F1EBA20B3CA /* Pods_GDChatMessage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 13EFD1E55F853B412648A98C /* Pods_GDChatMessage.framework */; };
BEA8EA992BECFCFA00162AD6 /* GDMessageGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEA8EA982BECFCFA00162AD6 /* GDMessageGuideView.swift */; };
BEC737F92B627B3A006391D3 /* GDChatMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = BEC737F82B627B3A006391D3 /* GDChatMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; BEC737F92B627B3A006391D3 /* GDChatMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = BEC737F82B627B3A006391D3 /* GDChatMessage.h */; settings = {ATTRIBUTES = (Public, ); }; };
BEC738092B627B84006391D3 /* GDChatMessageAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEC738002B627B84006391D3 /* GDChatMessageAPI.swift */; }; BEC738092B627B84006391D3 /* GDChatMessageAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEC738002B627B84006391D3 /* GDChatMessageAPI.swift */; };
BEC7380A2B627B84006391D3 /* GDChatMessageHttpHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEC738012B627B84006391D3 /* GDChatMessageHttpHelper.swift */; }; BEC7380A2B627B84006391D3 /* GDChatMessageHttpHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEC738012B627B84006391D3 /* GDChatMessageHttpHelper.swift */; };
...@@ -101,6 +102,7 @@ ...@@ -101,6 +102,7 @@
13EFD1E55F853B412648A98C /* Pods_GDChatMessage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GDChatMessage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 13EFD1E55F853B412648A98C /* Pods_GDChatMessage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GDChatMessage.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1C60D1D821E1015E5B94D6CF /* Pods-GDChatMessage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GDChatMessage.release.xcconfig"; path = "Target Support Files/Pods-GDChatMessage/Pods-GDChatMessage.release.xcconfig"; sourceTree = "<group>"; }; 1C60D1D821E1015E5B94D6CF /* Pods-GDChatMessage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GDChatMessage.release.xcconfig"; path = "Target Support Files/Pods-GDChatMessage/Pods-GDChatMessage.release.xcconfig"; sourceTree = "<group>"; };
4048B94281E811ECB2770048 /* Pods-GDChatMessage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GDChatMessage.debug.xcconfig"; path = "Target Support Files/Pods-GDChatMessage/Pods-GDChatMessage.debug.xcconfig"; sourceTree = "<group>"; }; 4048B94281E811ECB2770048 /* Pods-GDChatMessage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GDChatMessage.debug.xcconfig"; path = "Target Support Files/Pods-GDChatMessage/Pods-GDChatMessage.debug.xcconfig"; sourceTree = "<group>"; };
BEA8EA982BECFCFA00162AD6 /* GDMessageGuideView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GDMessageGuideView.swift; sourceTree = "<group>"; };
BEC737F52B627B3A006391D3 /* GDChatMessage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GDChatMessage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BEC737F52B627B3A006391D3 /* GDChatMessage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GDChatMessage.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BEC737F82B627B3A006391D3 /* GDChatMessage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GDChatMessage.h; sourceTree = "<group>"; }; BEC737F82B627B3A006391D3 /* GDChatMessage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GDChatMessage.h; sourceTree = "<group>"; };
BEC738002B627B84006391D3 /* GDChatMessageAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GDChatMessageAPI.swift; sourceTree = "<group>"; }; BEC738002B627B84006391D3 /* GDChatMessageAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GDChatMessageAPI.swift; sourceTree = "<group>"; };
...@@ -230,6 +232,14 @@ ...@@ -230,6 +232,14 @@
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
BEA8EA972BECFCDB00162AD6 /* Guide */ = {
isa = PBXGroup;
children = (
BEA8EA982BECFCFA00162AD6 /* GDMessageGuideView.swift */,
);
path = Guide;
sourceTree = "<group>";
};
BEC737EB2B627B3A006391D3 = { BEC737EB2B627B3A006391D3 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -460,6 +470,7 @@ ...@@ -460,6 +470,7 @@
BEC738442B635C64006391D3 /* Message */ = { BEC738442B635C64006391D3 /* Message */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
BEA8EA972BECFCDB00162AD6 /* Guide */,
BEC738452B635C64006391D3 /* Preorder */, BEC738452B635C64006391D3 /* Preorder */,
BEC7384F2B635C64006391D3 /* Notification */, BEC7384F2B635C64006391D3 /* Notification */,
BEC738762B635C64006391D3 /* MomentMessage */, BEC738762B635C64006391D3 /* MomentMessage */,
...@@ -1058,6 +1069,7 @@ ...@@ -1058,6 +1069,7 @@
BEC7389F2B635C64006391D3 /* GDSingleChatMessageModel.swift in Sources */, BEC7389F2B635C64006391D3 /* GDSingleChatMessageModel.swift in Sources */,
BEC7389A2B635C64006391D3 /* GDBlackListModel.swift in Sources */, BEC7389A2B635C64006391D3 /* GDBlackListModel.swift in Sources */,
BEC738C12B635C64006391D3 /* GDMessageNotificationRechargeInfoCell.swift in Sources */, BEC738C12B635C64006391D3 /* GDMessageNotificationRechargeInfoCell.swift in Sources */,
BEA8EA992BECFCFA00162AD6 /* GDMessageGuideView.swift in Sources */,
BEC7380A2B627B84006391D3 /* GDChatMessageHttpHelper.swift in Sources */, BEC7380A2B627B84006391D3 /* GDChatMessageHttpHelper.swift in Sources */,
BEC738D52B635C64006391D3 /* GDServiceChatCell.swift in Sources */, BEC738D52B635C64006391D3 /* GDServiceChatCell.swift in Sources */,
BEC738D42B635C64006391D3 /* GDServiceInputView.swift in Sources */, BEC738D42B635C64006391D3 /* GDServiceInputView.swift in Sources */,
......
//
// GDMessageGuideView.swift
// TealiveSwift
//
// Created by Jim Chan on 2021/8/11.
// Copyright © 2021 YAZHAI Inc. All rights reserved.
//
import UIKit
import GDToolBox
import GDRouter
class GDMessageGuideView: BaseView {
var clickHandler: EmptyClosure?
let targetFrame: CGRect
init(targetFrame: CGRect) {
self.targetFrame = targetFrame
super.init(frame: GDScreen.frame)
//TODO:Live: added By Pidan
// GDDataCenter.shared.audienceInviteCenter.enableToShowInviteView.accept(false)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
// MARK: UI
override func makeUI() {
super.makeUI()
self.backgroundColor = .clear
let bgView = UIView(frame: GDScreen.frame)
bgView.backgroundColor = .init(white: 0, alpha: 0.6)
self.addSubview(bgView)
let btn = UIButton(type: .custom)
btn.frame = .init(x: 0, y: 0, width: 74, height: 80)
btn.center = .init(x: targetFrame.origin.x + (targetFrame.size.width / 2.0), y: targetFrame.origin.y + (targetFrame.size.height / 2.0) + 8)
btn.setImage(GDChatMessageBundle.imageNamed("guide_message_mask_icon"), for: .normal)
btn.alpha = 0
self.addSubview(btn)
let wordImageView = UIImageView(frame: .zero)
wordImageView.image = GDChatMessageBundle.imageNamed("guide_message_word_60")
wordImageView.animationImages = GDChatMessageBundle.animatedImageArrayNamed("guide_message_word_")
wordImageView.animationDuration = 4
wordImageView.animationRepeatCount = 1
wordImageView.size = .init(width: 265, height: 30)
wordImageView.centerX = btn.centerX
wordImageView.y = btn.y - 30 - wordImageView.height
self.addSubview(wordImageView)
wordImageView.startAnimating()
let dotImageView = UIImageView(image: GDChatMessageBundle.imageNamed("guide_dot_icon"))
dotImageView.size = .init(width: 5, height: 5)
dotImageView.centerX = wordImageView.centerX
dotImageView.centerY = wordImageView.maxY
dotImageView.alpha = 0
self.addSubview(dotImageView)
let lineView = UIView(frame: .zero)
lineView.backgroundColor = .hexColor("84E3E3")
lineView.size = .init(width: 1, height: 0)
lineView.center = dotImageView.center
lineView.alpha = 0
self.insertSubview(lineView, belowSubview: dotImageView)
btn.rx.tap.subscribe(onNext: {[weak self] _ in
self?.removeFromSuperview()
self?.clickHandler?()
//TODO:Live: added By Pidan
// GDDataCenter.shared.audienceInviteCenter.enableToShowInviteView.accept(true)
UserDefaults.standard.setValue(true, forKey: GDChatRoomPublicUDKey.hadShowMessageGuide)
}).disposed(by: disposeBag)
UIView.animate(withDuration: 0.15, delay: 0.5, options: .layoutSubviews) {
dotImageView.alpha = 1
lineView.alpha = 1
} completion: { _ in
UIView.animate(withDuration: 0.25) {
dotImageView.centerY = btn.y
lineView.height = 30
} completion: { _ in
btn.transform = .init(scaleX: 0.9, y: 0.9)
UIView.animate(withDuration: 0.25) {
btn.alpha = 1
btn.transform = .identity
} completion: { _ in
let scaleAnimation = CAKeyframeAnimation(keyPath: "transform.scale")
scaleAnimation.values = [1, 1.1, 1]
scaleAnimation.duration = 1.5
scaleAnimation.repeatCount = .infinity
scaleAnimation.timingFunction = .init(name: .easeInEaseOut)
btn.layer.add(scaleAnimation, forKey: nil)
}
}
}
}
// MARK: Data
override func bindViewModel() {
super.bindViewModel()
self.addGestureRecognizer(UITapGestureRecognizer(actionBlock: {[weak self] _ in
self?.removeFromSuperview()
UserDefaults.standard.setValue(true, forKey: GDChatRoomPublicUDKey.hadShowMessageGuide)
//TODO:Live: added By Pidan
// GDDataCenter.shared.audienceInviteCenter.enableToShowInviteView.accept(true)
}))
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "img_v3_02ao_2856b54d-712c-4404-8c46-f95f99e4c95g.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "img_v3_02ao_e9e83035-b357-45e3-a724-e1b383d9060g.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_10@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_11@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_12@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_13@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_14@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_15@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_16@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_17@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_18@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_19@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_2@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_20@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_21@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_22@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_23@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_24@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_25@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_26@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_27@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_28@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_29@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_3@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_30@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_31@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_32@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_33@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_34@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_35@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_36@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_37@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_38@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_39@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_4@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_40@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_41@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_42@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_43@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_44@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "guide_message_word_45@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment