Cmd+N New
Cmd+Shift+N New(incognite mode)
Cmd+Shift+W Close
Cmd+T New
Cmd+Shift+T Last closed tab
| /** よく使うフォント名 */ | |
| #define HIRAKAKU_FONT @"HiraKakuProN-W3" | |
| #define HIRAKAKU_FONT_BOLD @"HiraKakuProN-W6" | |
| #define HIRAMIN_FONT @"HiraMinProN-W3" | |
| #define HIRAMIN_FONT_BOLD @"HiraMinProN-W6" | |
| #define ARIAL_FONT @"ArialMT" | |
| #define ARIAL_FONT_BOLD @"Arial-BoldMT" |
| /** 画面の主要パーツの高さ */ | |
| #define NAVIGATION_BAR_HEIGHT 44.0f | |
| #define TAB_BAR_HEIGHT 49.0f | |
| #define STATUS_BAR_HEIGHT 20.0f | |
| #define PAGE_CONTROL_HEIGHT 18.0f |
| /** 4インチ画面ならtrue */ | |
| #define IS_4INCH_SCREEN (fabs((double)[[UIScreen mainScreen] bounds].size.height - (double)568) < DBL_EPSILON) | |
| /** 画面高(ステータスバー領域を含まない) */ | |
| #define SCREEN_HEIGHT CGRectGetHeight([UIScreen mainScreen].applicationFrame) | |
| /** 画面幅 */ | |
| #define SCREEN_WIDTH CGRectGetWidth([UIScreen mainScreen].applicationFrame) |
| UIBarButtonItem *closeButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"閉じる" | |
| style:UIBarButtonItemStyleBordered | |
| target:self | |
| action:@selector(close:)]; | |
| self.navigationItem.leftBarButtonItem = closeButtonItem; | |
| [closeButtonItem release]; |
| #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) |
| // これを適当なメソッドにして、CustomAnnotationViewにセットし、MKMapViewDelegateのmapView:didAddAnnotationViews | |
| // でそのメソッドを呼び出すか、CustomAnnoationViewのdidMoveToSuperviewメソッドにセットする。 | |
| CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"]; | |
| animation.duration = 0.4; | |
| animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]; | |
| animation.fromValue = [NSValue valueWithCATransform3D:CATransform3DMakeTranslation(0, -400, 0)]; | |
| animation.toValue = [NSValue valueWithCATransform3D:CATransform3DIdentity]; | |
| CABasicAnimation *animation2 = [CABasicAnimation animationWithKeyPath:@"transform"]; |
| // | |
| // override a setter | |
| // | |
| // NSStringはcopyするという記事もあるが、copyもretainも同じ。 | |
| // you do not need to make a copy when Foo is a NSString. | |
| // "copy" and "retain" for NSString are internally the same action. | |
| - (void)setFoo:(Foo *)aFoo { | |
| if (aFoo != foo) { | |
| [foo release]; | |
| foo = [aFoo retain]; |