简体   繁体   中英

How to implement UITableViewCell without UITableView

I want to use the power of UITableViewCell like disclosure accessory, but I don't need the whole UITableView. Is this possible and appropriate to do so? I don't see any delegate on UITableViewCell, so don't know where should I put code previously in - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath; any references or suggestions on this?

You could just make a UITableView with one section and one row, and load that cell into it. This would be pretty easy to do and wouldn't run the risk of running afoul of the Apple review board.

Correct me if im wrong but.. Why would you use a cell like that? If you dont want to use the power of the UITableView you can just add a view and do all the stuff you do in your cell. And that would keep the Apple Standard too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM