Skip to content

Commit

Permalink
[core] Delete UIView+NimbusCore category.
Browse files Browse the repository at this point in the history
  • Loading branch information
jverkoey committed Jul 25, 2012
1 parent aacfa4b commit 7db6cd1
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 102 deletions.
8 changes: 0 additions & 8 deletions src/Nimbus.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -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; };
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
};
Expand Down
1 change: 0 additions & 1 deletion src/core/src/NimbusCore+Additions.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@

// Additions
#import "NSString+NimbusCore.h"
#import "UIView+NimbusCore.h"
20 changes: 10 additions & 10 deletions src/core/src/NimbusCore+Namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand Down
25 changes: 0 additions & 25 deletions src/core/src/UIView+NimbusCore.h

This file was deleted.

41 changes: 0 additions & 41 deletions src/core/src/UIView+NimbusCore.m

This file was deleted.

17 changes: 0 additions & 17 deletions src/core/unittests/NICoreAdditionTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 12 additions & 0 deletions src/core/unittests/NIFoundationMethodsTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,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 -
Expand Down

0 comments on commit 7db6cd1

Please sign in to comment.