iPhoneSDK:画面サイズ取得とアニメーションメモ

メモ:

//画面幅の取得。
CGRect scrRect = [[UIScreen mainScreen] applicationFrame];

//--------------------
//アニメーション
//--------------------
//
// musicTable = UIViewクラス
//
CGContextRef context = UIGraphicsGetCurrentContext();

[UIView beginAnimations:nil context:context];
// 0.25秒でアニメ
[UIView setAnimationDuration:0.25];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(endAnimtaion)];

// アニメショーン情報を設定
CGPoint point1 = musicTable.center;
CGPoint point2 = CGPointMake(point1.x,0);

// Animation Of point1 to point2
[musicTable setCenter:point1]; 
[musicTable setCenter:point2];

// startAnimatino
[UIView commitAnimations];
まだiPhoneプログラムを初めて日が浅いけれど
実コードが置かれたページがゴロゴロあり
ネット情報そのものがオープンソースに近い。

なのでやり方を調べるだけであまりプログラム書いてる感じじゃないなー。
今のところ。。

コメント

このブログの人気の投稿

.NET:FileSystemWatcherで複数フィルタ指定

AI画像生成の力をかりる

君たちはどう生きるか