iPhoneアプリ開発
第 6 版(2010-06-08 19:29:39 · akkun_choi)を表示しています。 最新版に戻る
登録について
http://developer.apple.com/jp/programs/iphone/includes/compare.html#compare
スクリーンサイズの取得
UIScreen* screen = [UIScreen mainScreen]; CGSize size = screen.bounds.size;
アニメーション
http://forums.pragprog.com/forums/57/topics/2182
-(void) doSomeAnimationForDuration:(float) seconds {
NSNumber *duration = [NSNumber numberWithFloat:seconds * 0.5f];
[UIView beginAnimations:@"foo" context:duration];
[UIView setAnimationDuration:seconds/2.0f];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(someAnimationDidStop:finished:context:)];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
// change some property values here
[UIView commitAnimations];
}
-(void) someAnimationDidStop:(NSString *)animationID finished:(BOOL)finished context:(void *)duration {
NSNumber *seconds = (NSNumber *)duration; // removing the cast d/n work either . . .
// why can't I pull the float value out?
float f = [seconds floatValue]; // this is where we crash . . .
[UIView beginAnimations:@"foo2" context:nil];
[UIView setAnimationDuration: [seconds floatValue]];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(glowOffAnimationDidStop)];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
//change another set of properties here
[UIView commitAnimations];
}
めんど…。
参考本
iPhoneSafariで動かすWebサイトの作り方と、iPhoneネイティブアプリの作り方が半々。幅広い。とりあえず一冊でいいならこれ。
まだあんまり読んでない。詳しそう。
今のところ一番役に立ってる。全編Interface Builderを排除した解説になっている。
IB使わないコーディングはブラックボックスにならないので理解しやすい。
履歴
- 第 10 版akkun_choi2010-06-14 12:28:36
- 第 9 版akkun_choi2010-06-08 19:33:54
- 第 8 版akkun_choi2010-06-08 19:31:23
- 第 7 版akkun_choi2010-06-08 19:30:02
- 第 6 版akkun_choi2010-06-08 19:29:39
- 第 5 版akkun_choi2010-06-08 17:49:16
- 第 4 版akkun_choi2010-06-08 17:31:23
- 第 3 版akkun_choi2010-06-08 17:19:42
- 第 2 版akkun_choi2010-06-08 17:18:24
- 第 1 版akkun_choi2010-06-08 17:17:59