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
| # | |
| # Ruby Script to convert FontAwesome | |
| # glyph information into Objective-C literals | |
| # (Ends up being a big array of NSDictionary objects) | |
| # Output is to stdout. Assumes icons.yml is in working directory. | |
| # Copyright (c) 2013 iOSDeveloperZone.com | |
| # MIT license -- See: http://opensource.org/licenses/MIT | |
| require 'yaml' | |
| # |
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
| #define S(_s) @selector(application##_s:) // selector generator | |
| #define N(_n) UIApplication##_n##Notification // name generator | |
| #define L(X) X(WillResignActive), X(DidEnterBackground), \ | |
| X(WillEnterForeground), X(DidBecomeActive), X(WillTerminate) // apply X over list | |
| #define C(_a) sizeof((_a))/sizeof((_a)[0]) // array count | |
| - (void)monitorAppState:(BOOL)start | |
| { | |
| NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; |
NewerOlder