| name | language | licence |
|---|---|---|
| Force Application Crash | Objective-C | Other |
| FourCharCode to NSString | Objective-C | Other |
| ROT13 | Objective-C | Other |
| NSIndexSet to String | Objective-C | Other |
| getBoundingClientRect from WebKit using JavaScriptCore | Objective-C | Other |
| NSImage Create QuickLook icon for URL | Objective-C | Other |
| Method Replacement (swizzle) | Objective-C | Other |
| Safe respondsToSelector: override | Objective-C | Other |
< 1 2 3 >
language: Objective-C
licence: Other
FourCharCode to NSString
options: view full snippet • send to code collector
// Two extensions to covert the FourCharCode values used in various places into a string and back again
@interface NSString (NSString-Extensions)
+ (NSString *) stringFromOSType:(unsigned long)type;
-(unsigned long) OSType;
@end
@implementation NSString (NSString-Extensions)
+ (NSString *) stringFromOSType:(unsigned long)type
{
SInt32 hardwareType;
Gestalt( gestaltSysArchitecture, &hardwareType );
UInt32 _type = type;
if( hardwareType == gestaltIntel )



library
objective-c (22)