Skip to content

Commit 964bcb4

Browse files
authored
Merge pull request #113 from johnarn/Xcode-12.5-warning-fixes
Fix Xcode 12.5 warnings
2 parents 9de8936 + 332e2de commit 964bcb4

6 files changed

Lines changed: 12 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# CHANGELOG
1+
# CHANGELOG
2+
3+
## WIP
4+
* Fix Xcode 12.5 warnings about the class keyword for protocol inheritance that is deprecated.
5+
[@johnarn](https://github.com/johnarn)
6+
[@AliSoftware](https://github.com/AliSoftware)
7+
[#113](https://github.com/AliSoftware/Reusable/pull/113)
28

39
## 4.1.1
410

Sources/Storyboard/StoryboardBased.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import UIKit
1616
/// * this ViewController is the initialViewController of your Storyboard
1717
///
1818
/// to be able to instantiate them from the Storyboard in a type-safe manner
19-
public protocol StoryboardBased: class {
19+
public protocol StoryboardBased: AnyObject {
2020
/// The UIStoryboard to use when we want to instantiate this ViewController
2121
static var sceneStoryboard: UIStoryboard { get }
2222
}

Sources/Storyboard/StoryboardSceneBased.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import UIKit
1818
/// to be able to instantiate them from the Storyboard in a type-safe manner.
1919
///
2020
/// You need to implement `sceneStoryboard` yourself to indicate the UIStoryboard this scene is from.
21-
public protocol StoryboardSceneBased: class {
21+
public protocol StoryboardSceneBased: AnyObject {
2222
/// The UIStoryboard to use when we want to instantiate this ViewController
2323
static var sceneStoryboard: UIStoryboard { get }
2424
/// The scene identifier to use when we want to instantiate this ViewController from its associated Storyboard

Sources/View/NibLoadable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import UIKit
1616
/// * this class is used as the XIB's root view
1717
///
1818
/// to be able to instantiate them from the NIB in a type-safe manner
19-
public protocol NibLoadable: class {
19+
public protocol NibLoadable: AnyObject {
2020
/// The nib file to use to load a new instance of the View designed in a XIB
2121
static var nib: UINib { get }
2222
}

Sources/View/NibOwnerLoadable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import UIKit
1616
/// * this class is used as the XIB's File's Owner
1717
///
1818
/// to be able to instantiate them from the NIB in a type-safe manner
19-
public protocol NibOwnerLoadable: class {
19+
public protocol NibOwnerLoadable: AnyObject {
2020
/// The nib file to use to load a new instance of the View designed in a XIB
2121
static var nib: UINib { get }
2222
}

Sources/View/Reusable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import UIKit
1414
/// Make your `UITableViewCell` and `UICollectionViewCell` subclasses
1515
/// conform to this protocol when they are *not* NIB-based but only code-based
1616
/// to be able to dequeue them in a type-safe manner
17-
public protocol Reusable: class {
17+
public protocol Reusable: AnyObject {
1818
/// The reuse identifier to use when registering and later dequeuing a reusable cell
1919
static var reuseIdentifier: String { get }
2020
}

0 commit comments

Comments
 (0)