开发者

How to implement UITableViewCell without UITableView

开发者 https://www.devze.com 2023-03-16 17:19 出处:网络
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,

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 accessoryB开发者_StackOverflow中文版uttonTappedForRowWithIndexPath:(NSIndexPath *)indexPath; any references or suggestions on this ?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消