开发者社区 问答 正文

iOS 如何自定义TableViewCell?

一个TableView, 其列表内容, 期望按照不同的ServiceType, 显示不同内容的TableViewCell, 也就是说每一种ServiceType对应一种类型的 TableViewCell, 显示在同一个列表中. 大家有什么好建议?

展开
收起
杨冬芳 2016-06-29 19:21:19 2097 分享 版权
1 条回答
写回答
取消 提交回答
  • IT从业

    • (UITableViewCell )tableView:(UITableView )_tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

    这个方法里面实现你的需求,有多少种就定义多少种cell。

    2019-07-17 19:49:21
    赞同 展开评论