Skip to content

Commit b2f2a13

Browse files
authored
Merge pull request #70 from RakuyoKit/feature/enhance
Feature/enhance
2 parents ab4bd9b + c045ff1 commit b2f2a13

9 files changed

+24
-35
lines changed

Sources/Base/Controller/NavigationControllerPopDelegateProxy.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#if !os(watchOS) && !os(tvOS)
1010
import UIKit
1111

12-
public class NavigationControllerPopDelegateProxy: NSObject, UIGestureRecognizerDelegate {
12+
public final class NavigationControllerPopDelegateProxy: NSObject, UIGestureRecognizerDelegate {
1313
public weak var navigationController: UINavigationController?
1414
public weak var popGestureRecognizerDelegate: UIGestureRecognizerDelegate?
1515

Sources/Base/Controller/BaseNavigationController.swift Sources/Base/Controller/RAKBaseNavigationController.swift

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// BaseNavigationController.swift
2+
// RAKBaseNavigationController.swift
33
// RakuyoKit
44
//
55
// Created by Rakuyo on 2024/4/10.
@@ -11,8 +11,7 @@ import UIKit
1111

1212
import RAKConfig
1313

14-
@objc(RAKBaseNavigationController)
15-
open class BaseNavigationController: UINavigationController {
14+
open class RAKBaseNavigationController: UINavigationController {
1615
#if !os(tvOS)
1716
private var popDelegateProxy: NavigationControllerPopDelegateProxy? = nil
1817
#endif
@@ -34,7 +33,7 @@ open class BaseNavigationController: UINavigationController {
3433
}
3534
}
3635

37-
extension BaseNavigationController {
36+
extension RAKBaseNavigationController {
3837
#if !os(tvOS)
3938
override open var childForStatusBarStyle: UIViewController? { topViewController }
4039

Sources/Base/Controller/BaseViewController.swift Sources/Base/Controller/RAKBaseViewController.swift

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// BaseViewController.swift
2+
// RAKBaseViewController.swift
33
// RakuyoKit
44
//
55
// Created by Rakuyo on 2024/4/10.
@@ -14,11 +14,7 @@ import Combine
1414
import RaLog
1515

1616
/// Base class for view controllers.
17-
///
18-
/// Renamed with `@objc` to resolve symbol redefinition issues encountered in the `XXModule-swift.h` file
19-
/// when inheriting `SwissArmyKnife.BaseViewController` to implement its own `BaseViewController`.
20-
@objc(RAKBaseViewController)
21-
open class BaseViewController: RotatableViewController {
17+
open class RAKBaseViewController: RAKRotatableViewController {
2218
#if !os(tvOS)
2319
/// Default status bar style: black.
2420
public static let statusBarStyle = UIStatusBarStyle.default
@@ -35,7 +31,7 @@ open class BaseViewController: RotatableViewController {
3531

3632
// MARK: - Life cycle
3733

38-
extension BaseViewController {
34+
extension RAKBaseViewController {
3935
#if !os(tvOS)
4036
override open var preferredStatusBarStyle: UIStatusBarStyle {
4137
Self.statusBarStyle
@@ -75,7 +71,7 @@ extension BaseViewController {
7571

7672
// MARK: - Life cycle extension
7773

78-
extension BaseViewController {
74+
extension RAKBaseViewController {
7975
@objc // swiftformat:disable:next unusedArguments
8076
open func viewWillAppear(_ animated: Bool, isFirstEnter: Bool) { }
8177

@@ -85,7 +81,7 @@ extension BaseViewController {
8581

8682
// MARK: - Log
8783

88-
extension BaseViewController {
84+
extension RAKBaseViewController {
8985
@objc
9086
open func logDeinit() { Log.deinit(self) }
9187

Sources/Base/Controller/RotatableViewController.swift Sources/Base/Controller/RAKRotatableViewController.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// RotatableViewController.swift
2+
// RAKRotatableViewController.swift
33
// RakuyoKit
44
//
55
// Created by Rakuyo on 2024/4/10.
@@ -10,7 +10,7 @@
1010
import UIKit
1111

1212
/// Base class for view controllers that provide rotation control.
13-
open class RotatableViewController: UIViewController {
13+
open class RAKRotatableViewController: UIViewController {
1414
#if !os(tvOS)
1515
/// Indicates whether the interface should autorotate.
1616
///
@@ -41,7 +41,7 @@ open class RotatableViewController: UIViewController {
4141
}
4242

4343
#if !os(visionOS) && !os(tvOS)
44-
extension RotatableViewController {
44+
extension RAKRotatableViewController {
4545
public static var normalPreferredInterfaceOrientation: UIInterfaceOrientation {
4646
guard case .pad = UIDevice.current.userInterfaceIdiom else { return .portrait }
4747

Sources/Base/View/Cell/BaseCollectionViewCell.swift Sources/Base/View/Cell/RAKBaseCollectionViewCell.swift

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// BaseCollectionViewCell.swift
2+
// RAKBaseCollectionViewCell.swift
33
// RakuyoKit
44
//
55
// Created by Rakuyo on 2024/4/10.
@@ -9,8 +9,7 @@
99
#if !os(watchOS)
1010
import UIKit
1111

12-
@objc(RAKBaseCollectionViewCell)
13-
open class BaseCollectionViewCell: UICollectionViewCell {
12+
open class RAKBaseCollectionViewCell: UICollectionViewCell {
1413
public typealias View = UICollectionView
1514

1615
override public init(frame: CGRect) {
@@ -24,9 +23,7 @@ open class BaseCollectionViewCell: UICollectionViewCell {
2423

2524
config()
2625
}
27-
}
28-
29-
extension BaseCollectionViewCell {
26+
3027
@objc
3128
open func config() {
3229
addSubviews()

Sources/Base/View/Cell/BaseTableViewCell.swift Sources/Base/View/Cell/RAKBaseTableViewCell.swift

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// BaseTableViewCell.swift
2+
// RAKBaseTableViewCell.swift
33
// RakuyoKit
44
//
55
// Created by Rakuyo on 2024/4/10.
@@ -9,8 +9,7 @@
99
#if !os(watchOS)
1010
import UIKit
1111

12-
@objc(RAKBaseTableViewCell)
13-
open class BaseTableViewCell: UITableViewCell {
12+
open class RAKBaseTableViewCell: UITableViewCell {
1413
public typealias View = UITableView
1514

1615
override public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
@@ -24,9 +23,7 @@ open class BaseTableViewCell: UITableViewCell {
2423

2524
config(style: .default, reuseIdentifier: "\(Self.self)")
2625
}
27-
}
28-
29-
extension BaseTableViewCell {
26+
3027
@objc
3128
open func config(style _: UITableViewCell.CellStyle, reuseIdentifier _: String?) {
3229
selectionStyle = .none
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// FinalFastCell.swift
2+
// RAKFinalFastCell.swift
33
// RakuyoKit
44
//
55
// Created by Rakuyo on 2024/4/10.
@@ -10,8 +10,8 @@
1010
import UIKit
1111

1212
/// Used directly in certain scenarios as a replacement for `UITableViewCell`.
13-
public final class FastTableViewCell: BaseTableViewCell, FastCell { }
13+
public final class RAKFastTableViewCell: RAKBaseTableViewCell, FastCell { }
1414

1515
/// Used directly in certain scenarios as a replacement for `UICollectionViewCell`.
16-
public final class FastCollectionViewCell: BaseCollectionViewCell, FastCell { }
16+
public final class RAKFastCollectionViewCell: RAKBaseCollectionViewCell, FastCell { }
1717
#endif

Sources/Base/View/BaseView.swift Sources/Base/View/RAKBaseView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// BaseView.swift
2+
// RAKBaseView.swift
33
// RakuyoKit
44
//
55
// Created by Rakuyo on 2024/5/24.
@@ -10,7 +10,7 @@
1010
import UIKit
1111

1212
/// A wrapper for the frame nature of `UIView`
13-
open class BaseView: UIView {
13+
open class RAKBaseView: UIView {
1414
override public init(frame: CGRect) {
1515
super.init(frame: frame)
1616

Sources/Epoxy/Row/BaseStyledEpoxyView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import EpoxyCore
1313
import RAKBase
1414

1515
/// For views that follow the `StyledView` protocol, you can use this base class to simplify initialization operations.
16-
open class BaseStyledEpoxyView<Style: Hashable>: RAKBase.BaseView, StyledView {
16+
open class BaseStyledEpoxyView<Style: Hashable>: RAKBaseView, StyledView {
1717
public let style: Style
1818

1919
public required init(style: Style) {

0 commit comments

Comments
 (0)