hachinoBlog

hachinobuのエンジニアライフ

2012-04-17から1日間の記事一覧

NSFetchedResultsControllerのsectionNameKeyPathで指定したカラム以外をセクションタイトルにする方法

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { //nameカラムをセクションタイトルとして使用したい場合 NSString *name = [[[[[_fetchedResultsController sections] objectAtIndex:section] objects] va…

NSFetchedResultsControllerから全ての値を取り出すとき

[_fetchedResultsController fetchedObjects] //fetchedObjectsプロパティで全て取得できる //あるカラムだけ取り出したいなら for (int i = 0; i < [[_fetchedResultsController fetchedObjects] count]; i++) { NSString *a = [[[_fetchedResultsControlle…