3
iPhone上でTableViewの各行の右に矢印を追加したいとします。どのようにこれを行うにはどのようなアイデア?iPhoneのTableViewの行の右側に画像を追加するには?
iPhone上でTableViewの各行の右に矢印を追加したいとします。どのようにこれを行うにはどのようなアイデア?iPhoneのTableViewの行の右側に画像を追加するには?
私はちょうどそれを働いた:
-(UITableViewCellAccessoryType)tableView:(UITableView *)tableView
accessoryTypeForRowWithIndexPath:(NSIndexPath *)indexPath
{
return UITableViewCellAccessoryDetailDisclosureButton;
}
-(void)tableView:(UITableView *)tableView
accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
//add action here
}
青い矢印は、各行の右側に表示されます。
多くのアプリで使用されているデフォルトの矢印(シェブロン)を意味しますか?
UITableViewCell *myCell = ...; //GET a cell from somewhere.
myCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;