#なんだかんだ
##えーと1 どういうこういう そういうどういう
##えーと2 どういうこういう そういうどういう
#なんだかんだ
##えーと1 どういうこういう そういうどういう
##えーと2 どういうこういう そういうどういう
| //weakだと、blokcksに入って、叩くまでの間に開放され得るらしく、叩く場合は、strongに代入 | |
| __weak Hoge *weakSelf = self; | |
| blocks = ^(void) | |
| { | |
| __strong Hoge *strongSelf = weakSelf; | |
| [strongSelf hogeWithHoge:4126] | |
| strongSelf = nil; | |
| }; |
| cocoaPod使ってるプロジェクトをXcode5でArchiveしようとすると | |
| 依存する-lPods.aがみつからないって怒られる | |
| ld: library not found for -lPods | |
| 解決策 | |
| Pods (the project) -> Pods (the target) -> Build settings -> Architectures | |
| をarmv7のものに直す。 | |
| 参考 | |
| https://github.com/CocoaPods/CocoaPods/pull/1352 |
| *markdown-cheat-sheet.jax* Markdown カンニングペーパー | |
| 作者: Kyo Nagashima <[email protected]> | |
| バージョン: 0.04 | |
| 説明: Markdown 記法のカンニングペーパーです。 | |
| 1. 記法の例 |markdown-cheat-sheet-examples| | |
| 1.1 段落 |markdown-cheat-sheet-paragraph| | |
| 1.2 改行 |markdown-cheat-sheet-linebreak| | |
| 1.3 テキストの強調 |markdown-cheat-sheet-emphasis| |
| //読み込んだ際に改行コードがエスケープされてしまうので、置換する | |
| myTextField.text = [dbString stringByReplacingOccurrencesOfString: @"\\n" withString: @"\n"]; |
| find ./ -name '*' | xargs grep hogehoge | |
| 拡張子がrbのものだけならば、以下のようにする。 | |
| find ./ -name '*.rb' | xargs grep hogehoge |
| #import <UIKit/UIKit.h> | |
| #import <QuartzCore/QuartzCore.h> | |
| @interface UIView (FadeAnimation) | |
| - (void)fadeIn; | |
| - (void)fadeOut; | |
| @end |
| //OS判定 | |
| #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | |
| #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | |
| #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | |
| #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) | |
| #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) | |
| //iOS7.x以上か? | |
| #define isiOS7 SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0") |
| //以下でIncompatible pointer types消える | |
| self.hoge.delegate = (id<hogeDelegate>)self; | |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |