Skip to content
Browse files

[core] Delete UIView+NimbusCore category.

  • Loading branch information...
1 parent aacfa4b commit 7db6cd18cddc77e3613ac5c57b6915dbf501ab01 @jverkoey committed
View
8 src/Nimbus.xcodeproj/project.pbxproj
@@ -259,8 +259,6 @@
66A0B0C214BD1116003FA413 /* NimbusNetworkControllers.h in Headers */ = {isa = PBXBuildFile; fileRef = 66A0B0BF14BD1116003FA413 /* NimbusNetworkControllers.h */; };
66A0B0C314BD1116003FA413 /* NINetworkTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 66A0B0C014BD1116003FA413 /* NINetworkTableViewController.h */; };
66A0B0C414BD1116003FA413 /* NINetworkTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66A0B0C114BD1116003FA413 /* NINetworkTableViewController.m */; };
- 66A0B0CC14BD15CA003FA413 /* UIView+NimbusCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 66A0B0CA14BD15CA003FA413 /* UIView+NimbusCore.h */; };
- 66A0B0CD14BD15CA003FA413 /* UIView+NimbusCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 66A0B0CB14BD15CA003FA413 /* UIView+NimbusCore.m */; };
66A0B0D014BD1635003FA413 /* NimbusNetworkControllers+Namespace.h in Headers */ = {isa = PBXBuildFile; fileRef = 66A0B0CF14BD1635003FA413 /* NimbusNetworkControllers+Namespace.h */; };
66B10900144C931F004576D1 /* UIButton+NIStyleable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B108FE144C931F004576D1 /* UIButton+NIStyleable.h */; };
66B10901144C931F004576D1 /* UIButton+NIStyleable.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B108FF144C931F004576D1 /* UIButton+NIStyleable.m */; };
@@ -875,8 +873,6 @@
66A0B0C014BD1116003FA413 /* NINetworkTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NINetworkTableViewController.h; path = networkcontrollers/src/NINetworkTableViewController.h; sourceTree = SOURCE_ROOT; };
66A0B0C114BD1116003FA413 /* NINetworkTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NINetworkTableViewController.m; path = networkcontrollers/src/NINetworkTableViewController.m; sourceTree = SOURCE_ROOT; };
66A0B0C814BD1586003FA413 /* deps */ = {isa = PBXFileReference; lastKnownFileType = text; name = deps; path = networkcontrollers/deps; sourceTree = SOURCE_ROOT; };
- 66A0B0CA14BD15CA003FA413 /* UIView+NimbusCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+NimbusCore.h"; sourceTree = "<group>"; };
- 66A0B0CB14BD15CA003FA413 /* UIView+NimbusCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+NimbusCore.m"; sourceTree = "<group>"; };
66A0B0CF14BD1635003FA413 /* NimbusNetworkControllers+Namespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NimbusNetworkControllers+Namespace.h"; path = "networkcontrollers/src/NimbusNetworkControllers+Namespace.h"; sourceTree = SOURCE_ROOT; };
66B108FE144C931F004576D1 /* UIButton+NIStyleable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIButton+NIStyleable.h"; path = "css/src/UIButton+NIStyleable.h"; sourceTree = SOURCE_ROOT; };
66B108FF144C931F004576D1 /* UIButton+NIStyleable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIButton+NIStyleable.m"; path = "css/src/UIButton+NIStyleable.m"; sourceTree = SOURCE_ROOT; };
@@ -1725,8 +1721,6 @@
6675E4B21455FCC5007D172F /* NIViewRecycler.m */,
66A03CB713E6EFAF00B514F3 /* NSString+NimbusCore.h */,
66A03C6313E6E8D100B514F3 /* NSString+NimbusCore.m */,
- 66A0B0CA14BD15CA003FA413 /* UIView+NimbusCore.h */,
- 66A0B0CB14BD15CA003FA413 /* UIView+NimbusCore.m */,
);
name = src;
path = core/src;
@@ -2164,7 +2158,6 @@
6675E4B31455FCC5007D172F /* NIViewRecycler.h in Headers */,
66C115411486ACE3003C9AC6 /* NIOperations+Subclassing.h in Headers */,
666F738014BBC65A00D1A32F /* NimbusCore+Namespace.h in Headers */,
- 66A0B0CC14BD15CA003FA413 /* UIView+NimbusCore.h in Headers */,
66E8CEE414D08F8200600592 /* NINonEmptyCollectionTesting.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -3420,7 +3413,6 @@
66A03C9313E6E8D100B514F3 /* NSString+NimbusCore.m in Sources */,
FD01BEDC14179D940023D783 /* NINavigationAppearance.m in Sources */,
6675E4B41455FCC5007D172F /* NIViewRecycler.m in Sources */,
- 66A0B0CD14BD15CA003FA413 /* UIView+NimbusCore.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
1 src/core/src/NimbusCore+Additions.h
@@ -24,4 +24,3 @@
// Additions
#import "NSString+NimbusCore.h"
-#import "UIView+NimbusCore.h"
View
20 src/core/src/NimbusCore+Namespace.h
@@ -70,9 +70,6 @@
#ifndef NI_FIX_CATEGORY_BUG_NSStringNimbusCore
#define NI_FIX_CATEGORY_BUG_NSStringNimbusCore __NIMBUS_NS_SYMBOL(NI_FIX_CATEGORY_BUG_NSStringNimbusCore)
#endif
-#ifndef NI_FIX_CATEGORY_BUG_UIViewNimbusCore
-#define NI_FIX_CATEGORY_BUG_UIViewNimbusCore __NIMBUS_NS_SYMBOL(NI_FIX_CATEGORY_BUG_UIViewNimbusCore)
-#endif
#ifndef Nimbus
#define Nimbus __NIMBUS_NS_SYMBOL(Nimbus)
#endif
@@ -152,8 +149,8 @@
#ifndef NIScreenScale
#define NIScreenScale __NIMBUS_NS_SYMBOL(NIScreenScale)
#endif
-#ifndef NIMakeNSRangeFromCFRange
-#define NIMakeNSRangeFromCFRange __NIMBUS_NS_SYMBOL(NIMakeNSRangeFromCFRange)
+#ifndef NIFrameOfCenteredViewWithinView
+#define NIFrameOfCenteredViewWithinView __NIMBUS_NS_SYMBOL(NIFrameOfCenteredViewWithinView)
#endif
#ifndef NIIsStringWithAnyText
#define NIIsStringWithAnyText __NIMBUS_NS_SYMBOL(NIIsStringWithAnyText)
@@ -173,17 +170,17 @@
#ifndef NIUIPopoverControllerClass
#define NIUIPopoverControllerClass __NIMBUS_NS_SYMBOL(NIUIPopoverControllerClass)
#endif
-#ifndef NIMD5HashFromData
-#define NIMD5HashFromData __NIMBUS_NS_SYMBOL(NIMD5HashFromData)
-#endif
#ifndef NIUITapGestureRecognizerClass
#define NIUITapGestureRecognizerClass __NIMBUS_NS_SYMBOL(NIUITapGestureRecognizerClass)
#endif
#ifndef NIPathForCachesResource
#define NIPathForCachesResource __NIMBUS_NS_SYMBOL(NIPathForCachesResource)
#endif
-#ifndef NISHA1HashFromData
-#define NISHA1HashFromData __NIMBUS_NS_SYMBOL(NISHA1HashFromData)
+#ifndef NIMakeNSRangeFromCFRange
+#define NIMakeNSRangeFromCFRange __NIMBUS_NS_SYMBOL(NIMakeNSRangeFromCFRange)
+#endif
+#ifndef NIMD5HashFromData
+#define NIMD5HashFromData __NIMBUS_NS_SYMBOL(NIMD5HashFromData)
#endif
#ifndef NISwizzleMethodsForNetworkActivityDebugging
#define NISwizzleMethodsForNetworkActivityDebugging __NIMBUS_NS_SYMBOL(NISwizzleMethodsForNetworkActivityDebugging)
@@ -194,6 +191,9 @@
#ifndef NIDisableNetworkActivityDebugging
#define NIDisableNetworkActivityDebugging __NIMBUS_NS_SYMBOL(NIDisableNetworkActivityDebugging)
#endif
+#ifndef NISHA1HashFromData
+#define NISHA1HashFromData __NIMBUS_NS_SYMBOL(NISHA1HashFromData)
+#endif
#ifndef NIIsStringWithWhitespaceAndNewlines
#define NIIsStringWithWhitespaceAndNewlines __NIMBUS_NS_SYMBOL(NIIsStringWithWhitespaceAndNewlines)
#endif
View
25 src/core/src/UIView+NimbusCore.h
@@ -1,25 +0,0 @@
-//
-// Copyright 2011 Jeff Verkoeyen
-//
-// Forked from Three20 June 10, 2011 - Copyright 2009-2011 Facebook
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-#import <UIKit/UIKit.h>
-
-@interface UIView (NimbusCore)
-
-- (void)centerWithin:(UIView *)otherView;
-
-@end
View
41 src/core/src/UIView+NimbusCore.m
@@ -1,41 +0,0 @@
-//
-// Copyright 2011 Jeff Verkoeyen
-//
-// Forked from Three20 June 10, 2011 - Copyright 2009-2011 Facebook
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-#import "UIView+NimbusCore.h"
-
-#import "NIFoundationMethods.h"
-#import "NIPreprocessorMacros.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "Nimbus requires ARC support."
-#endif
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////
-NI_FIX_CATEGORY_BUG(UIViewNimbusCore)
-
-@implementation UIView (NimbusCore)
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-- (void)centerWithin:(UIView *)otherView {
- self.frame = NIFrameOfCenteredViewWithinView(self, otherView);
-}
-
-@end
View
17 src/core/unittests/NICoreAdditionTests.m
@@ -173,21 +173,4 @@ - (void)testNSString_sha1Hash {
}
-///////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark -
-#pragma mark UIView Additions
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-- (void)testCenterWithin {
- UIView *containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
- UIView *subview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
-
- [subview centerWithin:containerView];
-
- STAssertTrue(CGRectEqualToRect(subview.frame, CGRectMake(45, 45, 10, 10)), @"Rect should be centered.");
-}
-
-
@end
View
12 src/core/unittests/NIFoundationMethodsTests.m
@@ -54,6 +54,18 @@ - (void)testCGRectMethods {
///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)testCGRectCenterWithin {
+ UIView *containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
+ UIView *subview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
+
+ CGRect centeredFrame = NIFrameOfCenteredViewWithinView(subview, containerView);
+
+ STAssertTrue(CGRectEqualToRect(centeredFrame, CGRectMake(45, 45, 10, 10)), @"Rect should be centered.");
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark -
#pragma mark NSRange Methods

0 comments on commit 7db6cd1

Please sign in to comment.
Something went wrong with that request. Please try again.