tableView

| コメント(0) | トラックバック(0)

新たに追加した「UIViewController subclass」(UITableViewController subclassのチェックを外して生成)にtableViewが必要な場合、

  1. 生成したUIViewControllerクラスのインターフェースファイル(「.h」ファイル)にプロトコル<UITableViewDataSource>を追加
  2. Interface Builderでライブラリから「TableView」を「View」に貼付ける
  3. 貼付けた「TableView」上で右クリックして、「dataSource」を「File's Owner」に結びつける
  4. 生成したUIViewControllerクラスのメソッドファイル(「.m」ファイル)の任意の位置にUITableViewDataSourceの必須メソッドを記述

UITableViewDataSource必須メソッド(2つ)

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

トラックバック(0)

トラックバックURL: http://www.ayabin.jp/mt5/mt-tb.cgi/85

コメントする

このブログ記事について

このページは、webmasterが2010年12月 5日 10:56に書いたブログ記事です。

ひとつ前のブログ記事は「警告local declaration...」です。

次のブログ記事は「UITableViewCellカスタマイズ」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。