Skip to content

Commit

Permalink
Wrote -className for NSObject on iPhone
Browse files Browse the repository at this point in the history
  • Loading branch information
fjolnir committed Aug 29, 2008
1 parent b7ba943 commit ffa76ba
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Source/Utilities/iPhone Hacks/NSObject+iPhoneHacks.h
@@ -0,0 +1,15 @@
//
// NSObject+iPhoneHacks.h
// ActiveRecord
//
// Created by Fjölnir Ásgeirsson on 27.8.2008.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//


#if (TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR)
@interface NSObject (iPhoneHacks)
+ (NSString *)classname;
- (NSString *)className;
@end
#endif
22 changes: 22 additions & 0 deletions Source/Utilities/iPhone Hacks/NSObject+iPhoneHacks.m
@@ -0,0 +1,22 @@
//
// NSObject+iPhoneHacks.m
// ActiveRecord
//
// Created by Fjölnir Ásgeirsson on 27.8.2008.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//

#if (TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR)
#import "NSObject+iPhoneHacks.h"

@implementation NSObject_iPhoneHacks
+ (NSString *)classname
{
return NSStringFromClass(self);
}
- (NSString *)className
{
return [[self class] className];
}
@end
#endif

0 comments on commit ffa76ba

Please sign in to comment.