主要学习的内容:
- 如果通过点击键盘return键关闭键盘
- 跳转回之前的View
- 如何将数据传递给之前的View(本次使用Delegate方法)
开发环境:
- macOS 10.12
- Xcode 8.0
- iOS 10.0
- Swift 3.0
参考:
- dismiss keyboard with a uiTextView
- Pass Information Back to the Previous View Controller. Example in Swift.
- Programmatically go back to previous ViewController in Swift
- Xcode 8 / Swift 3: “Expression of type UIViewController? is unused” warning
- [Swift] Automatically make keyboard show
源代码: