Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Commit 92b5fde

Browse files
committed
Remove UIKit dependency from Core folder
1 parent 07c34aa commit 92b5fde

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

Library/Core/NibResource.swift

-9
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ public protocol NibResource {
1919
}
2020

2121
public extension NibResource {
22-
/**
23-
Create a new instance of this nib file
24-
25-
- returns: A new instance of this nib
26-
*/
27-
public func initialize() -> UINib {
28-
return UINib.init(nibName: name, bundle: bundle)
29-
}
30-
3122
/**
3223
Instantiate the nib to get the top-level object from this nib
3324

Library/UIKit/NibResource+UIKit.swift

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// NibResource+UIKit.swift
3+
// R.swift.Library
4+
//
5+
// Created by Mathijs Kadijk on 06-01-16.
6+
// Copyright © 2016 Mathijs Kadijk. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
public extension NibResource {
12+
/**
13+
Create a new instance of this nib file
14+
15+
- returns: A new instance of this nib
16+
*/
17+
public func initialize() -> UINib {
18+
return UINib.init(nibName: name, bundle: bundle)
19+
}
20+
}

R.swift.Library.xcodeproj/project.pbxproj

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
D59246521C117A55007F94C7 /* Rswift.h in Headers */ = {isa = PBXBuildFile; fileRef = D59246511C117A55007F94C7 /* Rswift.h */; settings = {ATTRIBUTES = (Public, ); }; };
2222
D59246591C117A55007F94C7 /* Rswift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D592464E1C117A55007F94C7 /* Rswift.framework */; };
2323
D592465E1C117A55007F94C7 /* RswiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D592465D1C117A55007F94C7 /* RswiftTests.swift */; };
24+
D5E435A91C3CFB460091090C /* NibResource+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */; };
2425
/* End PBXBuildFile section */
2526

2627
/* Begin PBXContainerItemProxy section */
@@ -51,6 +52,7 @@
5152
D59246581C117A55007F94C7 /* RswiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RswiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
5253
D592465D1C117A55007F94C7 /* RswiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RswiftTests.swift; sourceTree = "<group>"; };
5354
D592465F1C117A55007F94C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
55+
D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NibResource+UIKit.swift"; sourceTree = "<group>"; };
5456
/* End PBXFileReference section */
5557

5658
/* Begin PBXFrameworksBuildPhase section */
@@ -81,6 +83,7 @@
8183
D543F9C91C14998800D16A0C /* UIViewController+StoryboardSegueIdentifierProtocol.swift */,
8284
D543F9CB1C1499AB00D16A0C /* UIStoryboardSegue+StoryboardSegueIdentifierProtocol.swift */,
8385
D543F9CE1C149C0A00D16A0C /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift */,
86+
D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */,
8487
);
8588
path = UIKit;
8689
sourceTree = "<group>";
@@ -251,6 +254,7 @@
251254
D543F9C61C14992000D16A0C /* UICollectionView+ReuseIdentifierProtocol.swift in Sources */,
252255
D543F9BF1C14983100D16A0C /* StoryboardSegueIdentifierProtocol.swift in Sources */,
253256
D543F9C81C14995800D16A0C /* UIViewController+NibResource.swift in Sources */,
257+
D5E435A91C3CFB460091090C /* NibResource+UIKit.swift in Sources */,
254258
D543F9CF1C149C0A00D16A0C /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift in Sources */,
255259
D543F9C41C1498FB00D16A0C /* UITableView+ReuseIdentifierProtocol.swift in Sources */,
256260
D53F19241C229D7200AE2FAD /* Validatable.swift in Sources */,

0 commit comments

Comments
 (0)