UITableViewの背景の設定方法

UIView 別途作成して、そのUIViewにsetBackgroundColorで背景を指定したものを、
UITableView.backgroundViewに設定する感じですな。
どうもiOS6からか、この設定をしないと背景が適用されないようですな。

UITableView *tableView    = [[[UITableView alloc]initWithFrame:CGRectMake(0, 0, 320, 480) style:UITableViewStyleGrouped] autorelease];
UIView      *v_background = [[[UIView alloc] init] autorelease];
[v_background setFrame:tableView.bounds];
[v_background setBackgroundColor:[UIColor clearColor]];
[tableView setDelegate:self];
[tableView setDataSource:self];
[tableView setBackgroundView:v_background];          // iOS6からはこれを設定しないと変わらない?
[tableView setBackgroundColor:[UIColor clearColor]]; // iOS5まではこの設定のみで背景指定出来てた?

[self.view addSubview:tableView];

画面・カメラ解像度

iPhoneのディスプレイの縦横サイズについてまとめてみたぞい。

iPhone3GS以前 320 x 480
iPhone4 640 x 960
iPad 768 x 1024
iPad2 768 x 1024

次はカメラで撮影した写真の縦横サイズぢゃ。
プログラムで画面に表示させる場合は、リサイズする必要がありそうぢゃのう。

iPhone3G 1200 x 1600
iPhone3GS 1536 x 2048
iPhone4 1936 x 2592
iPad2 720 x 960
iPhone4 front camera 480 x 640
iPod2 front camera 480 x 640

NSString stringWithFormat で指定できるフォーマット

%@ 文字列
%c 一つの文字
%d Integer(符号付10進数表示)
%u Integer(符号なし10進数表示)
%o Integer(符号付8進数表示)
%x Integer(符号付16進数表示)
%X Integer(符号なし16進数表示)
%e doubleを指数付きで表示
%f  doubleを指数なし表示
%.2f doubleを小数点第2位まで表示
%.1f doubleを小数点第1位まで表示
%g doubleをeかfのいずれか短い方で表示
%s 文字列を最初のNULLまで表示