Swift Project 08 - SWIPE TO DISMISS KEYBOARD
主要学习的内容:
- 重温了一下 UIBarButtonItem
- 学习了解了 UISwipeGestureRecognizer 的用法
- 处理 4 种不同的 swipe 动作
- 赶进一步了解 selector 的用法
开发环境:
- macOS 10.12
- Xcode 8.0
- iOS 10.0
- Swift 3.0
组件:
参考:
- Dismiss keyboard with swipe gesture
- Dismiss UITextField Keyboard With Swipe
- How to recognize swipe in all 4 directions
- Understanding Swift 2.2 Selector Syntax - #selector()
源代码: