From 8410e65e0d23dd94cbeeed0ebd237e610b7b2c2c Mon Sep 17 00:00:00 2001 From: corin8823 Date: Tue, 10 Nov 2015 09:12:00 +0900 Subject: [PATCH] Remove unnecessary protocol --- SwiftyExtensions.xcodeproj/project.pbxproj | 4 ---- SwiftyExtensions/UIView+Addtions.swift | 12 ---------- .../UIViewController+UIStoryBoard.swift | 22 ------------------- 3 files changed, 38 deletions(-) delete mode 100644 SwiftyExtensions/UIViewController+UIStoryBoard.swift diff --git a/SwiftyExtensions.xcodeproj/project.pbxproj b/SwiftyExtensions.xcodeproj/project.pbxproj index f84a624..053c9b6 100644 --- a/SwiftyExtensions.xcodeproj/project.pbxproj +++ b/SwiftyExtensions.xcodeproj/project.pbxproj @@ -18,7 +18,6 @@ 015B5B0F1B6DD9BF0087F4D3 /* UIView+Addtions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 015B5B061B6DD9BF0087F4D3 /* UIView+Addtions.swift */; }; 015B5B141B6DDAF10087F4D3 /* UICollectionView+Register.swift in Sources */ = {isa = PBXBuildFile; fileRef = 015B5B111B6DDAF10087F4D3 /* UICollectionView+Register.swift */; }; 015B5B151B6DDAF10087F4D3 /* UITableView+Register.swift in Sources */ = {isa = PBXBuildFile; fileRef = 015B5B121B6DDAF10087F4D3 /* UITableView+Register.swift */; }; - 015B5B161B6DDAF10087F4D3 /* UIViewController+UIStoryBoard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 015B5B131B6DDAF10087F4D3 /* UIViewController+UIStoryBoard.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -46,7 +45,6 @@ 015B5B061B6DD9BF0087F4D3 /* UIView+Addtions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Addtions.swift"; sourceTree = ""; }; 015B5B111B6DDAF10087F4D3 /* UICollectionView+Register.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UICollectionView+Register.swift"; sourceTree = ""; }; 015B5B121B6DDAF10087F4D3 /* UITableView+Register.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITableView+Register.swift"; sourceTree = ""; }; - 015B5B131B6DDAF10087F4D3 /* UIViewController+UIStoryBoard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+UIStoryBoard.swift"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -99,7 +97,6 @@ 015B5B051B6DD9BF0087F4D3 /* UIImageView+Addtions.swift */, 015B5B121B6DDAF10087F4D3 /* UITableView+Register.swift */, 015B5B061B6DD9BF0087F4D3 /* UIView+Addtions.swift */, - 015B5B131B6DDAF10087F4D3 /* UIViewController+UIStoryBoard.swift */, ); path = SwiftyExtensions; sourceTree = ""; @@ -246,7 +243,6 @@ 015B5B0E1B6DD9BF0087F4D3 /* UIImageView+Addtions.swift in Sources */, 015B5B151B6DDAF10087F4D3 /* UITableView+Register.swift in Sources */, 015B5B0F1B6DD9BF0087F4D3 /* UIView+Addtions.swift in Sources */, - 015B5B161B6DDAF10087F4D3 /* UIViewController+UIStoryBoard.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/SwiftyExtensions/UIView+Addtions.swift b/SwiftyExtensions/UIView+Addtions.swift index 6192af4..b161a1c 100644 --- a/SwiftyExtensions/UIView+Addtions.swift +++ b/SwiftyExtensions/UIView+Addtions.swift @@ -85,16 +85,4 @@ extension UIView { } return false } -} - -public protocol NibLoadable { - func loadNib() -> Self -} - -public extension NibLoadable { - - func loadNib() -> Self { - let className = StringFromType(Self) - return NSBundle.mainBundle().loadNibNamed(className, owner: nil, options: nil)[0] as! Self - } } \ No newline at end of file diff --git a/SwiftyExtensions/UIViewController+UIStoryBoard.swift b/SwiftyExtensions/UIViewController+UIStoryBoard.swift deleted file mode 100644 index c4a0439..0000000 --- a/SwiftyExtensions/UIViewController+UIStoryBoard.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// UIViewController+UIStoryBoard.swift -// SwiftyExtensions -// -// Created by yusuke takahashi on 8/2/15. -// Copyright (c) 2015 yusuke takahashi. All rights reserved. -// - -import UIKit - -public protocol StoryboardLoadable { - func loadStoryboard() -> Self -} - -public extension StoryboardLoadable { - - public func loadStoryboard() -> Self { - let className = StringFromType(Self) - let storyboard = UIStoryboard(name: className, bundle: nil) - return storyboard.instantiateViewControllerWithIdentifier(className) as! Self - } -} \ No newline at end of file