Swift开发:iPhone应用与Apple Watch应用实战
1. Swift iPhone应用开发
1.1 功能概述
在之前创建的基础书店iPhone应用上,我们将添加以下功能:
- 添加书籍
- 删除书籍
- 修改书籍
1.2 定义AddBookViewController
首先,定义 AddBookViewController ,以下是 prepareForSegue 函数的代码:
48 // MARK: - Segues
49
50 override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
51 if segue.identifier == "showDetail" {
52 if let indexPath = self.tableView.indexPathForSelectedRow {
53 let selectedBook:Book = myBookStore.theBookStore[(indexPath as
NSIndexPath).row]
54
55 let nav = segue.destination as! UINavigationController
56 let vc = nav.
超级会员免费看
订阅专栏 解锁全文
12

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



