This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <sys/types.h> | |
| #include <sys/sysctl.h> | |
| #if TARGET_OS_IPHONE | |
| char *propertyName = "hw.machine"; | |
| #else | |
| char *propertyName = "hw.model"; | |
| #endif | |
| size_t size; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @implementation UIResponder (ResponderForwarding) | |
| - (BOOL) tryToPerformAction:(SEL)action withObject:(id)object | |
| @end | |
| @implementation UIResponder (ResponderForwarding) | |
| - (BOOL) tryToPerformAction:(SEL)action withObject:(id)object | |
| { | |
| if (!action) { | |
| return NO; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSURL *someURL = [NSURL URLWithBuilderBlock:^(NSURLComponents *builder) { | |
| builder.scheme = @"http"; | |
| builder.host = @"joris.kluivers.nl"; | |
| builder.path = @"/blog/2013/10/17/nsurlcomponents/"; | |
| }]; | |
| // url now equals: | |
| // http://joris.kluivers.nl/blog/2013/10/17/nsurlcomponents/ |
OlderNewer