深入探索iMessage扩展与应用测试
1. 实现iMessage应用的展开视图
在完成iMessage应用紧凑视图的实现后,接下来要实现展开视图。展开视图将是一个表格视图,用于列出 Quote 结构体中的所有引用。
1.1 创建新的视图控制器
首先,创建一个新的 UITableViewController 子类,命名为 QuotesTableViewController 。可以移除大部分注释模板代码,仅保留以下方法:
override func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return Quote.numberOfQuotes
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "QuoteTableViewCell", for: indexPath)
let quote = Quote.quot
超级会员免费看
订阅专栏 解锁全文
13

被折叠的 条评论
为什么被折叠?



