diff --git a/RTCCommon.podspec b/RTCCommon.podspec index 4d56994..6d86406 100644 --- a/RTCCommon.podspec +++ b/RTCCommon.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |spec| spec.name = "RTCCommon" - spec.version = "1.0.1" + spec.version = "1.0.2" spec.platform = :ios spec.ios.deployment_target = '12.0' spec.license = { :type => 'Proprietary', @@ -15,7 +15,7 @@ Pod::Spec.new do |spec| spec.summary = 'RTCCommon' spec.swift_version = '5.0' - spec.source = { :git => 'https://github.com/Tencent-RTC/uikit-common.git', :tag => 'v1.0.1' } + spec.source = { :git => 'https://github.com/Tencent-RTC/uikit-common.git', :tag => 'v1.0.2' } spec.source_files = 'Source/**/**/*.*', 'Source/Utils/**/*.*' spec.dependency 'SnapKit' diff --git a/Source/BaseView/RTCBaseView.swift b/Source/BaseView/RTCBaseView.swift index 224fe77..c6f83a3 100644 --- a/Source/BaseView/RTCBaseView.swift +++ b/Source/BaseView/RTCBaseView.swift @@ -1,6 +1,6 @@ // // RTCBaseView.swift -// TUIKitCommon +// RTCCommon // // Created by aby on 2024/5/14. // @@ -22,11 +22,9 @@ func warning(_ string: String, fileName: String = #file, methodName: String = #f } open class RTCBaseView: UIView { - open var isViewReady = true public override init(frame: CGRect) { super.init(frame: frame) - constructViewHierarchy() } @available(*, unavailable, message: "Loading this view from a nib is unsupported") @@ -34,15 +32,15 @@ open class RTCBaseView: UIView { fatalError("Loading this view from a nib is unsupported") } - override open func didMoveToWindow() { + private var isViewReady = false + open override func didMoveToWindow() { super.didMoveToWindow() - guard !isViewReady else { - return - } + guard !isViewReady else { return } + constructViewHierarchy() activateConstraints() - setupViewStyle() bindInteraction() - isViewReady = false + setupViewStyle() + isViewReady = true } // This function must to be override. diff --git a/Source/Extension/CGFloat+scale375.swift b/Source/Extension/CGFloat+scale375.swift index 650919a..87beb4c 100644 --- a/Source/Extension/CGFloat+scale375.swift +++ b/Source/Extension/CGFloat+scale375.swift @@ -1,6 +1,6 @@ // // CGFloat+scale375.swift -// TUIKitCommon +// RTCCommon // // Created by krabyu on 2023/10/16. // Copyright © 2023 Tencent. All rights reserved. diff --git a/Source/Permission/PermissionManager.swift b/Source/Permission/PermissionManager.swift index c15d6ca..11de90d 100644 --- a/Source/Permission/PermissionManager.swift +++ b/Source/Permission/PermissionManager.swift @@ -1,6 +1,6 @@ // // PermissionManager.swift -// TUIKitCommon +// RTCCommon // // Created by WesleyLei on 2023/9/27. // Copyright © 2023 Tencent. All rights reserved. diff --git a/Source/Utils/LocalizedLanguage.swift b/Source/Utils/LocalizedLanguage.swift index d7529c4..28e71c6 100644 --- a/Source/Utils/LocalizedLanguage.swift +++ b/Source/Utils/LocalizedLanguage.swift @@ -1,6 +1,6 @@ // // LocalizedLanguage.swift -// TUIKitCommon +// RTCCommon // // Created by krabyu on 2024/4/16. // diff --git a/Source/Utils/WindowUtils.swift b/Source/Utils/WindowUtils.swift index 140b0c6..6f14c6e 100644 --- a/Source/Utils/WindowUtils.swift +++ b/Source/Utils/WindowUtils.swift @@ -1,6 +1,6 @@ // // WindowUtils.swift -// TUIKitCommon +// RTCCommon // // Created by krab on 2023/10/16. // @@ -18,7 +18,7 @@ public class WindowUtils { } return UIApplication.shared.windows.first } - + public static func getCurrentWindowViewController() -> UIViewController? { var keyWindow: UIWindow? for window in UIApplication.shared.windows { diff --git a/Source/View/AlertPanel.swift b/Source/View/AlertPanel.swift index 4e086b4..d3a1aa6 100644 --- a/Source/View/AlertPanel.swift +++ b/Source/View/AlertPanel.swift @@ -1,6 +1,6 @@ // // AlertPanel.swift -// TUIKitCommon +// RTCCommon // // Created by krabyu on 2023/11/14. // diff --git a/Source/View/PopupPanelController.swift b/Source/View/PopupPanelController.swift index 0127c49..cb79d98 100644 --- a/Source/View/PopupPanelController.swift +++ b/Source/View/PopupPanelController.swift @@ -1,6 +1,6 @@ // // PopUpPanel.swift -// TUIKitCommon +// RTCCommon // // Created by krabyu on 2023/10/12. // Copyright © 2023 Tencent. All rights reserved.