2009-08-14から1日間の記事一覧

セルの再利用

NSString *cellIdentifier=[NSString stringWithFormat:@"Cell %d",index1]; UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:cellIdentifier]; if (cell==nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIde…

セルの大きさ

UITableViewCellの大きさは通常320×44、グルーピングされている場合は左右が10ドット空くので300×44。

セルの高さがそれぞれで違う場合

UITableViewのセルの高さを指定するにはrowHeightプロパティを使用するが、それぞれの高さを変えたい場合はデリゲートメソッドのtableView:heightForRowAtIndexPath:で指定する。iPhoneアプリケーションプログラミング技術評論社 2009-06-19売り上げランキン…