This file contains 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
/** | |
Provides the ability to verify key paths at compile time. | |
If "keyPath" does not exist, a compile-time error will be generated. | |
Example: | |
// Verifies "isFinished" exists on "operation". | |
NSString *key = SQKeyPath(operation, isFinished); | |
// Verifies "isFinished" exists on self. |
This file contains 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
#import <Foundation/Foundation.h> | |
#import "MBProgressHUD.h" | |
@interface HUD : NSObject | |
+(MBProgressHUD*)showUIBlockingIndicator; | |
+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str; | |
+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str withTimeout:(int)seconds; | |
+(MBProgressHUD*)showUIBlockingProgressIndicatorWithText:(NSString*)str andProgress:(float)progress; |
This file contains 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
// | |
// ImagePreDeCompresser.h | |
// PreDecompressionImage | |
// | |
// Created by Aegaeon on 12/20/13. | |
// Copyright (c) 2013 Aegaeon. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains 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
#import <UIKit/UIKit.h> | |
@interface ViewController : UIViewController | |
@property (nonatomic, strong) CABasicAnimation *animationCopy; | |
@end |
This file contains 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
#import <Foundation/Foundation.h> | |
@interface NSString (XMLInvalidateCharactersEscaper) | |
/** | |
* | |
+------------+------------+------------+ | |
| 禁用字符 | 转义字符 | 说明 | | |
+------------+------------+------------+ | |
| < | < | 小于 | |
This file contains 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
#import "NSString+XMLInvalidateCharactersEscaper.h" | |
#import <objc/runtime.h> | |
static void *CustomObjectKey; | |
@implementation NSString (XMLInvalidateCharactersEscaper) | |
/* | |
* category中使用property的示例 |
This file contains 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
- (void)drawRect:(CGRect)rect | |
{ | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextSaveGState(context); | |
{ | |
size_t num_locations = 2; | |
CGFloat locations[2] = {0.1, 0.9}; // 突出一个聚焦点 | |
CGFloat colorComponents[8] = { 68.0/255.0, 68.0/255.0, 68.0/255.0, 1.0, | |
32.0/255.0, 36.0/255.0, 41.0/255.0, 1.0 }; |
This file contains 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
platform :ios, '6.0' | |
pod 'AFNetworking', '1.2.0' | |
pod 'FPPopover', :git => 'https://github.com/50pixels/FPPopover.git' |
This file contains 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
UIImage *grayImage(UIImage *source) | |
{ | |
int width = source.size.width; | |
int height = source.size.height; | |
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray(); | |
CGContextRef context = CGBitmapContextCreate (nil, | |
width, | |
height, |
This file contains 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
APP = MyProject | |
WORKSPACE = MyProject | |
CONFIG = Release | |
SCHEME = MyProject | |
# iMessage addresses list seperated with white space | |
IMSG_LIST = xdreamarshal@gmail.com | |
# Comment the following line if you prefer Bonjour Network | |
# BASE_URL = http://ota.nsnotfound.com |