- 追加された行はこの色です。
- 削除された行はこの色です。
[[Programming]]
iPhone SDK メモ
スタンフォード大で [[iPhone 開発講座とコード:http://www.appbank.net/2008/10/30/iphone-news/1100.php]]が公開されていたらしいが,今は削除されている.
* テーブルのグループ化と配列 [#lc850e3e]
return [[ array objectAtIndex:section] count]
cex.text = [[ array objectAtIndex:indexPath.section]
objectAtIndex:indexPath.row]
return cell;
でいけるだろう。
[[こういう方法:http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray/]]も紹介されている.
* 文字列から改行記号を取る. [#m0c7d174]
[[componentsSeparatedByString:http://www.oomori.com/cocoafw/Foundation/NSString/componentsSeatedByString.html]]関数が指定されたトークンで文字列を区切って配列を返すので,とりあえずこうする.
string = [[string componentsSeparatedByString:@"\n"]
objectAtIndex:0];
ただし "\n" はマックではoptions キーを押しながら円マークで入力