UITableViewCellアプリストアアプリのように、タイトルの右に「すべて見る>」ボタンを追加するにはどうすればよいですか?
3 に答える
0
ボタン (およびヘッダー タイトル) をカスタムUIViewに追加し、それをテーブル ヘッダーとして追加できます (-[UITableView
tableHeaderView]
于 2014-06-27T12:04:53.337 に答える
0
UIButtonカスタム UITableViewCell にドラッグするだけです。そのUIButton外観スタイルをカスタマイズして、コンテンツ テキストに「See All>」と記述します。.h ファイルにボタン プロパティのリンクを作成し、 delegate メソッドCustomCellのボタンに targetSelector を追加します。例のために-cellForRowAtIndexPathMethodUITableView
[seeAllBtn addTarget:self action:@selector(seeAllAction:) forControlEvents:UIControlEventTouchUpInside];
ownerのコントローラーにこのメソッドを実装することを忘れないでくださいUITableView。
于 2014-06-27T12:05:37.657 に答える
0
そんな感じ :
UIBarButtonItem *button = [[UIBarButtonItem alloc] init];
[button setTitle:@"See all"];
[self.navigationItem setRightBarButtonItem:button];
于 2014-06-27T11:58:07.483 に答える