![Page 1: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/1.jpg)
#WWDC17
© 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.
Kasia Wawer, iOS Keyboards Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards
•The Keys to a Better Text Input Experience •Crafting a better typing experience in your app • Session 242
App Frameworks
![Page 2: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/2.jpg)
Create a Better Input Experience
![Page 3: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/3.jpg)
Create a Better Input Experience
•Integrate the keyboard into your layout
![Page 4: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/4.jpg)
Create a Better Input Experience
•Integrate the keyboard into your layout•Create dynamic input accessory views
![Page 5: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/5.jpg)
Create a Better Input Experience
•Integrate the keyboard into your layout•Create dynamic input accessory views•Make your app multilingual
![Page 6: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/6.jpg)
Create a Better Input Experience
•Integrate the keyboard into your layout•Create dynamic input accessory views•Make your app multilingual•Use traits for smarter QuickType
![Page 7: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/7.jpg)
Create a Better Input Experience
•Integrate the keyboard into your layout•Create dynamic input accessory views•Make your app multilingual•Use traits for smarter QuickType•Hardware keyboard support
![Page 8: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/8.jpg)
Create a Better Input Experience
•Integrate the keyboard into your layout•Create dynamic input accessory views•Make your app multilingual•Use traits for smarter QuickType•Hardware keyboard support•Custom input views
![Page 9: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/9.jpg)
Create a Better Input Experience
•Integrate the keyboard into your layout•Create dynamic input accessory views•Make your app multilingual•Use traits for smarter QuickType•Hardware keyboard support•Custom input views•Keyboard extension tips and best practices
![Page 10: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/10.jpg)
Kasia Wawer, iOS Keyboards
•Integrating the Keyboard into Your App •Adaptivity and input accessory views
![Page 11: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/11.jpg)
![Page 12: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/12.jpg)
•Accounting for changing keyboard heights •Working with non-scrolling layouts •Working with scrolling layouts •Adding an input accessory view
![Page 13: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/13.jpg)
Accounting for the Keyboard
![Page 14: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/14.jpg)
Accounting for the Keyboard
Heights vary by language and settings
![Page 15: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/15.jpg)
Accounting for the Keyboard
Heights vary by language and settings
![Page 16: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/16.jpg)
Accounting for the Keyboard
Heights vary by language and settings
![Page 17: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/17.jpg)
Accounting for the Keyboard
Heights vary by language and settings
![Page 18: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/18.jpg)
Accounting for the Keyboard
Heights vary by language and settings
![Page 19: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/19.jpg)
Accounting for the Keyboard
Heights vary by language and settings
Register for notifications UIKeyboardDidShow UIKeyboardDidHide UIKeyboardDidChangeFrame
![Page 20: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/20.jpg)
Undocked and Split Keyboards
![Page 21: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/21.jpg)
Undocked and Split Keyboards
Dismissing and undocking both send Hide notifications
![Page 22: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/22.jpg)
Undocked and Split Keyboards
Dismissing and undocking both send Hide notifications
Frame change notifications will continue when undocked
![Page 23: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/23.jpg)
Undocked and Split Keyboards
Dismissing and undocking both send Hide notifications
Frame change notifications will continue when undocked
Track the most recent Hide or Show event
![Page 24: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/24.jpg)
![Page 25: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/25.jpg)
![Page 26: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/26.jpg)
Being in the Right Space
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { if !keyboardIsHidden { guard let userInfo = notification.userInfo, let frame = userInfo[UIKeyboardFrameEndUserInfoKey] as? CGRect else { return } let convertedFrame = view.convert(frame, from: UIScreen.main.coordinateSpace) let intersectedKeyboardHeight = view.frame.intersection(convertedFrame).height } }
![Page 27: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/27.jpg)
Being in the Right Space
Keyboard is always in the screen coordinate space
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { if !keyboardIsHidden { guard let userInfo = notification.userInfo, let frame = userInfo[UIKeyboardFrameEndUserInfoKey] as? CGRect else { return } let convertedFrame = view.convert(frame, from: UIScreen.main.coordinateSpace) let intersectedKeyboardHeight = view.frame.intersection(convertedFrame).height } }
![Page 28: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/28.jpg)
Being in the Right Space
Keyboard is always in the screen coordinate space
Convert the frame from screen coordinates
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { if !keyboardIsHidden { guard let userInfo = notification.userInfo, let frame = userInfo[UIKeyboardFrameEndUserInfoKey] as? CGRect else { return } let convertedFrame = view.convert(frame, from: UIScreen.main.coordinateSpace) let intersectedKeyboardHeight = view.frame.intersection(convertedFrame).height } }
![Page 29: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/29.jpg)
Being in the Right Space
Keyboard is always in the screen coordinate space
Convert the frame from screen coordinates
Use the intersection of the converted keyboard frame and your view
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { if !keyboardIsHidden { guard let userInfo = notification.userInfo, let frame = userInfo[UIKeyboardFrameEndUserInfoKey] as? CGRect else { return } let convertedFrame = view.convert(frame, from: UIScreen.main.coordinateSpace) let intersectedKeyboardHeight = view.frame.intersection(convertedFrame).height } }
![Page 30: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/30.jpg)
•Accounting for changing keyboard heights •Working with non-scrolling layouts •Working with scrolling layouts •Adding an input accessory view
![Page 31: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/31.jpg)
![Page 32: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/32.jpg)
Create a custom UILayoutGuide and height constraint
Adaptive Keyboard-Inclusive Layouts
func setUpViews() { // ... view set up ... let keyboardGuide = UILayoutGuide() view.addLayoutGuide(keyboardGuide) heightConstraint = keyboardGuide.heightAnchor.constraint(equalToConstant: kDefaultHeight) heightConstraint.isActive = true // ... view set up ... }
![Page 33: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/33.jpg)
Create a custom UILayoutGuide and height constraint
Tie lowest view to top of your layout guide
Adaptive Keyboard-Inclusive Layouts
func setUpViews() { // ... keyboardGuide.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor) .isActive = true bottomSpacer.bottomAnchor.constraint(equalTo: keyboardGuide.topAnchor).isActive = true // ... }
![Page 34: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/34.jpg)
Create a custom UILayoutGuide and height constraint
Tie lowest view to top of your layout guide
Adaptive Keyboard-Inclusive Layouts
func setUpViews() { // ... keyboardGuide.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor) .isActive = true bottomSpacer.bottomAnchor.constraint(equalTo: keyboardGuide.topAnchor).isActive = true // ... }
![Page 35: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/35.jpg)
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { if !keyboardIsHidden { // ... Convert frame ... UIView.animate(withDuration: 0.2) { heightConstraint.constant = intersectedKeyboardHeight view.layoutIfNeeded() } } }
Create a custom UILayoutGuide and height constraint
Tie lowest view to top of your layout guide
Use the converted frame to set the height constraint of layout guide
Adaptive Keyboard-Inclusive Layouts
![Page 36: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/36.jpg)
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { if !keyboardIsHidden { // ... Convert frame ... UIView.animate(withDuration: 0.2) { heightConstraint.constant = intersectedKeyboardHeight view.layoutIfNeeded() } } }
Create a custom UILayoutGuide and height constraint
Tie lowest view to top of your layout guide
Use the converted frame to set the height constraint of layout guide
Adaptive Keyboard-Inclusive Layouts
![Page 37: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/37.jpg)
•Accounting for changing keyboard heights •Working with non-scrolling layouts •Working with scrolling layouts •Adding an input accessory view
![Page 38: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/38.jpg)
![Page 39: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/39.jpg)
Scrolling Views and Keyboards
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { if !keyboardIsHidden { // ... Convert frame ... scrollView.contentInset.bottom = intersectedKeyboardHeight // ... Handle content scrolling ... } }
![Page 40: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/40.jpg)
Scrolling Views and Keyboards
Make sure the keyboard is visible
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { if !keyboardIsHidden { // ... Convert frame ... scrollView.contentInset.bottom = intersectedKeyboardHeight // ... Handle content scrolling ... } }
![Page 41: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/41.jpg)
Scrolling Views and Keyboards
Make sure the keyboard is visible
Convert the frame and get the height
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { if !keyboardIsHidden { // ... Convert frame ... scrollView.contentInset.bottom = intersectedKeyboardHeight // ... Handle content scrolling ... } }
![Page 42: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/42.jpg)
Scrolling Views and Keyboards
Make sure the keyboard is visible
Convert the frame and get the height
Set content insets appropriately
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { if !keyboardIsHidden { // ... Convert frame ... scrollView.contentInset.bottom = intersectedKeyboardHeight // ... Handle content scrolling ... } }
![Page 43: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/43.jpg)
Scrolling Views and Keyboards
Make sure the keyboard is visible
Convert the frame and get the height
Set content insets appropriately
Handle scrolling the content if needed
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { if !keyboardIsHidden { // ... Convert frame ... scrollView.contentInset.bottom = intersectedKeyboardHeight // ... Handle content scrolling ... } }
![Page 44: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/44.jpg)
UITableViewController
Sets insets for you
Handle scrolling the content if needed
![Page 45: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/45.jpg)
UITableViewController
Sets insets for you
Handle scrolling the content if needed
@objc func keyboardFrameChanged(_ notification: Notification) -> Void { let bottomRow = IndexPath(row: items.count - 1, section: 0) tableView.scrollToRow(at: bottomRow, at: UITableViewScrollPosition.bottom, animated: true) }
![Page 46: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/46.jpg)
•Accounting for changing keyboard heights •Working with non-scrolling layouts •Working with scrolling layouts •Adding an input accessory view
![Page 47: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/47.jpg)
![Page 48: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/48.jpg)
Accessorizing the Keyboard
![Page 49: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/49.jpg)
Host view controller returns true for canBecomeFirstReponder
Accessorizing the Keyboard
![Page 50: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/50.jpg)
Host view controller returns true for canBecomeFirstReponder
Use custom view or view controller • For view, override inputAccessoryView • For view controller, override inputAccessoryViewController
Accessorizing the Keyboard
![Page 51: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/51.jpg)
Host view controller returns true for canBecomeFirstReponder
Use custom view or view controller • For view, override inputAccessoryView • For view controller, override inputAccessoryViewController
Changing height sends frame change notifications
Accessorizing the Keyboard
![Page 52: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/52.jpg)
Making Dynamic Input Accessory Views
Send
![Page 53: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/53.jpg)
Making Dynamic Input Accessory Views
Use expanding view to define height
Send
![Page 54: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/54.jpg)
Making Dynamic Input Accessory Views
Use expanding view to define height
Pin to top and bottom of content view Send
![Page 55: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/55.jpg)
Making Dynamic Input Accessory Views
Use expanding view to define height
Pin to top and bottom of content view
Use or define intrinsicContentSize
Send
expandingTextView.textContainer.heightTracksTextView = true expandingTextView.isScrollEnabled = false
![Page 56: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/56.jpg)
Making Dynamic Input Accessory Views
Use expanding view to define height
Pin to top and bottom of content view
Use or define intrinsicContentSize
Send
I’ll let you know if Ican come by then.
expandingTextView.textContainer.heightTracksTextView = true expandingTextView.isScrollEnabled = false
![Page 57: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/57.jpg)
// Using intrinsicContentSize to determine height
override var intrinsicContentSize: CGSize { var newSize = self.bounds.size newSize.height = kMinimumHeight if expandingTextView.bounds.size.height > 0.0 { newSize.height = expandingTextView.bounds.size.height + kVerticalPadding } if newSize.height > kMaximumHeight { newSize.height = kMaximumHeight } return newSize }
![Page 58: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/58.jpg)
// Using intrinsicContentSize to determine height
override var intrinsicContentSize: CGSize { var newSize = self.bounds.size newSize.height = kMinimumHeight if expandingTextView.bounds.size.height > 0.0 { newSize.height = expandingTextView.bounds.size.height + kVerticalPadding } if newSize.height > kMaximumHeight { newSize.height = kMaximumHeight } return newSize }
![Page 59: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/59.jpg)
// Using intrinsicContentSize to determine height
override var intrinsicContentSize: CGSize { var newSize = self.bounds.size newSize.height = kMinimumHeight if expandingTextView.bounds.size.height > 0.0 { newSize.height = expandingTextView.bounds.size.height + kVerticalPadding } if newSize.height > kMaximumHeight { newSize.height = kMaximumHeight } return newSize }
![Page 60: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/60.jpg)
// Using intrinsicContentSize to determine height
override var intrinsicContentSize: CGSize { var newSize = self.bounds.size newSize.height = kMinimumHeight if expandingTextView.bounds.size.height > 0.0 { newSize.height = expandingTextView.bounds.size.height + kVerticalPadding } if newSize.height > kMaximumHeight { newSize.height = kMaximumHeight } return newSize }
![Page 61: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/61.jpg)
// Using intrinsicContentSize to determine height
override var intrinsicContentSize: CGSize { var newSize = self.bounds.size newSize.height = kMinimumHeight if expandingTextView.bounds.size.height > 0.0 { newSize.height = expandingTextView.bounds.size.height + kVerticalPadding } if newSize.height > kMaximumHeight { newSize.height = kMaximumHeight } return newSize }
![Page 62: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/62.jpg)
// Using intrinsicContentSize to determine height
override var intrinsicContentSize: CGSize { var newSize = self.bounds.size newSize.height = kMinimumHeight if expandingTextView.bounds.size.height > 0.0 { newSize.height = expandingTextView.bounds.size.height + kVerticalPadding } if newSize.height > kMaximumHeight { newSize.height = kMaximumHeight } return newSize }
![Page 63: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/63.jpg)
![Page 64: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/64.jpg)
Shuchen Li, iOS Keyboards
•Making Your App Feel Magical •Using context to enrich text input experience
![Page 65: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/65.jpg)
•Multilingual •Being aware of context •The new “smarts” •Marked text •Hardware keyboard
![Page 66: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/66.jpg)
![Page 67: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/67.jpg)
![Page 68: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/68.jpg)
Remembering User Selected Keyboard
Look up Identifier
Set Selected Keyboard
Your App
User Defaults
<unique identifier 1> : en_US
<unique identifier 4> : pl_PL<unique identifier 3> : zh_Hans
…
<unique identifier 2> : en_US
User-selected Keyboard
Context Identifier String
![Page 69: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/69.jpg)
Remembering User Selected Keyboard
Look up Identifier
Set Selected Keyboard
Your App
User Defaults
<unique identifier 1> : en_US
<unique identifier 4> : pl_PL<unique identifier 3> : zh_Hans
…
<unique identifier 2> : en_US
User-selected Keyboard
Context Identifier String
![Page 70: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/70.jpg)
![Page 71: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/71.jpg)
ChatInputAccessoryView
becomesFirstResponder
![Page 72: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/72.jpg)
ChatInputAccessoryView
becomesFirstResponder
![Page 73: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/73.jpg)
ChatInputAccessoryView
ConversationViewController
becomesFirstResponder
![Page 74: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/74.jpg)
ChatInputAccessoryView
ConversationViewController
Navigation Controller
becomesFirstResponder
![Page 75: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/75.jpg)
becomesFirstResponder
ChatInputAccessoryView
ConversationViewController
Navigation Controller
![Page 76: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/76.jpg)
Text Input Context Identifier
class ConversationViewController: UITableViewController, UITextViewDelegate {
// ... other code ...
override var textInputContextIdentifier: String? {
// Returning some unique identifier here allows the keyboard to remember
// which language the user was typing in when they were last communicating
// with this person.
// It can be anything, as long as it's unique to each
// recipient (here we're just returning the name)
return self.conversation?.otherParticipant
}
// ... other code ...
}
![Page 77: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/77.jpg)
Text Input Context Identifier
class ConversationViewController: UITableViewController, UITextViewDelegate {
// ... other code ...
override var textInputContextIdentifier: String? {
// Returning some unique identifier here allows the keyboard to remember
// which language the user was typing in when they were last communicating
// with this person.
// It can be anything, as long as it's unique to each
// recipient (here we're just returning the name)
return self.conversation?.otherParticipant
}
// ... other code ...
}
![Page 78: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/78.jpg)
Kasia Wawer, iOS Keyboards
•Demo •Give your app a memory
![Page 79: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/79.jpg)
UIResponder to Remember Keyboard
textInputContextIdentifier
UITextInputMode
![Page 80: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/80.jpg)
•Multilingual •Being aware of context •The new “smarts” •Marked text •Hardware keyboard
![Page 81: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/81.jpg)
Being Aware of Context
UIKeyboardType
UITextContentTypes
![Page 82: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/82.jpg)
QuickType personal information
![Page 83: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/83.jpg)
QuickType personal information
![Page 84: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/84.jpg)
![Page 85: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/85.jpg)
QuickType address
![Page 86: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/86.jpg)
QuickType address
![Page 87: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/87.jpg)
(From Maps)
![Page 88: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/88.jpg)
QuickType sources
(From Maps)
![Page 89: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/89.jpg)
UITextContentType
Provides contextual predictions
Displays on QuickType bar
Increase Usage of Your App With Proactive Suggestions WWDC 2016
![Page 90: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/90.jpg)
Log In
UITextContentTypeUsername
UITextContentTypePassword
![Page 91: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/91.jpg)
Log In
UITextContentTypeUsername
UITextContentTypePassword
![Page 92: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/92.jpg)
Content Types for Password AutoFill
Introducing Password AutoFill for Apps WWDC 2017
NEW
Log In
UITextContentTypeUsername
UITextContentTypePassword
![Page 93: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/93.jpg)
•Multilingual •Being aware of context •The new “smarts” •Marked text •Hardware keyboard
![Page 94: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/94.jpg)
Smart Quote and Smart DashNEW
![Page 95: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/95.jpg)
Smart Quote and Smart Dash
SF Hello "a" “a”
Helvetica Neue "a" “a”
Lucida Grande "a" “a”
Avenir "a" “a”
Myriad Set "a" “a”
NEW
![Page 96: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/96.jpg)
Smart Quote and Smart Dash
SF Hello "a" “a”
Helvetica Neue "a" “a”
Lucida Grande "a" “a”
Avenir "a" “a”
Myriad Set "a" “a”
NEW
![Page 97: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/97.jpg)
Smart Quote and Smart Dash
Hyphen: 1-dash - ➜ -SF Hello "a" “a”
Helvetica Neue "a" “a”
Lucida Grande "a" “a”
Avenir "a" “a”
Myriad Set "a" “a”
NEW
![Page 98: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/98.jpg)
Smart Quote and Smart Dash
Hyphen: 1-dash - ➜ -
En dash: 2-dash - - ➜ –
SF Hello "a" “a”
Helvetica Neue "a" “a”
Lucida Grande "a" “a”
Avenir "a" “a”
Myriad Set "a" “a”
NEW
![Page 99: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/99.jpg)
Smart Quote and Smart Dash
Hyphen: 1-dash - ➜ -
En dash: 2-dash - - ➜ –
Em dash: 3-dash - - - ➜ —
SF Hello "a" “a”
Helvetica Neue "a" “a”
Lucida Grande "a" “a”
Avenir "a" “a”
Myriad Set "a" “a”
NEW
![Page 100: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/100.jpg)
Smart Insertion and Deletion
Vivian will bring Misiu and Jiwang to the party.Vivian will bring Misiuand Jiwangto the party.
![Page 101: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/101.jpg)
Smart Insertion and Deletion
Vivian will bring Misiu and Jiwang to the party.Vivian will bring Misiuand Jiwangto the party.
![Page 102: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/102.jpg)
Smart Insertion and Deletion
Vivian will bring Misiu and Jiwang to the party.Vivian will bring Misiu to the party.
![Page 103: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/103.jpg)
Smart Insertion and Deletion
Vivian will bring Misiu and Jiwang to the party.Vivian will bring Misiu and Jiwang to the party.
![Page 104: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/104.jpg)
Smart Insertion and Deletion
Vivian will bring Misiu and Jiwang to the party.Vivian will bring Misiu and Jiwang to the party.
![Page 105: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/105.jpg)
Smart Insertion and Deletion
Vivian will bring Misiu and Jiwang to the party.Vivian will bring Misiu and Jiwang to the party.
![Page 106: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/106.jpg)
Smart Insertion and Deletion
Vivian will bring Misiu and Jiwang to the party.Vivian will bring Misiuand Jiwangto the party.
![Page 107: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/107.jpg)
Smart Insertion and Deletion
Vivian will bring Misiu and Jiwang to the party.Vivian will bring Misiuand Jiwangto the party.
![Page 108: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/108.jpg)
UITextInputTraits
![Page 109: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/109.jpg)
UITextInputTraits
.default
.yes
.no
![Page 110: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/110.jpg)
UITextInputTraits
.default
.yes
.no
Understand your text entry
![Page 111: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/111.jpg)
•Multilingual •Being aware of context •The new “smarts” •Marked text •Hardware keyboard
![Page 112: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/112.jpg)
Marked text search
![Page 113: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/113.jpg)
Marked Text
Internationalization Best Practices WWDC 2016
![Page 114: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/114.jpg)
•Giving text widget a memory •Being aware of context •The new “smarts” •Marked text •Hardware keyboard
![Page 115: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/115.jpg)
Working with Hardware Keyboard
Key commands for hardware keyboards
![Page 116: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/116.jpg)
// UIKeyCommand
class ConversationViewController: UITableViewController, UITextViewDelegate {
// ... some code ...
override var keyCommands: [UIKeyCommand]? { return [ // Command + Down arrow goes to the next conversation UIKeyCommand(input: UIKeyInputDownArrow, modifierFlags: .command, action: #selector(switchToConversationKeyCommandInvoked(sender:)), discoverabilityTitle: NSLocalizedString("GO_TO_NEXT_CONVERSATION", comment: "")), // Command + Up arrow goes to the previous conversation UIKeyCommand(input: UIKeyInputUpArrow, modifierFlags: .command, action: #selector(switchToConversationKeyCommandInvoked(sender:)), discoverabilityTitle: NSLocalizedString("GO_TO_PREV_CONVERSATION", comment: "")) ] }
//... some code ...
}
![Page 117: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/117.jpg)
// UIKeyCommand
class ConversationViewController: UITableViewController, UITextViewDelegate {
// ... some code ...
override var keyCommands: [UIKeyCommand]? { return [ // Command + Down arrow goes to the next conversation UIKeyCommand(input: UIKeyInputDownArrow, modifierFlags: .command, action: #selector(switchToConversationKeyCommandInvoked(sender:)), discoverabilityTitle: NSLocalizedString("GO_TO_NEXT_CONVERSATION", comment: "")), // Command + Up arrow goes to the previous conversation UIKeyCommand(input: UIKeyInputUpArrow, modifierFlags: .command, action: #selector(switchToConversationKeyCommandInvoked(sender:)), discoverabilityTitle: NSLocalizedString("GO_TO_PREV_CONVERSATION", comment: "")) ] }
//... some code ...
}
![Page 118: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/118.jpg)
// UIKeyCommand
class ConversationViewController: UITableViewController, UITextViewDelegate {
// ... some code ...
override var keyCommands: [UIKeyCommand]? { return [ // Command + Down arrow goes to the next conversation UIKeyCommand(input: UIKeyInputDownArrow, modifierFlags: .command, action: #selector(switchToConversationKeyCommandInvoked(sender:)), discoverabilityTitle: NSLocalizedString("GO_TO_NEXT_CONVERSATION", comment: "")), // Command + Up arrow goes to the previous conversation UIKeyCommand(input: UIKeyInputUpArrow, modifierFlags: .command, action: #selector(switchToConversationKeyCommandInvoked(sender:)), discoverabilityTitle: NSLocalizedString("GO_TO_PREV_CONVERSATION", comment: "")) ] }
//... some code ...
}
![Page 119: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/119.jpg)
// UIKeyCommand
class ConversationViewController: UITableViewController, UITextViewDelegate {
// ... some code ...
override var keyCommands: [UIKeyCommand]? { return [ // Command + Down arrow goes to the next conversation UIKeyCommand(input: UIKeyInputDownArrow, modifierFlags: .command, action: #selector(switchToConversationKeyCommandInvoked(sender:)), discoverabilityTitle: NSLocalizedString("GO_TO_NEXT_CONVERSATION", comment: "")), // Command + Up arrow goes to the previous conversation UIKeyCommand(input: UIKeyInputUpArrow, modifierFlags: .command, action: #selector(switchToConversationKeyCommandInvoked(sender:)), discoverabilityTitle: NSLocalizedString("GO_TO_PREV_CONVERSATION", comment: "")) ] }
//... some code ...
}
![Page 120: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/120.jpg)
![Page 121: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/121.jpg)
•Multilingual •Being aware of context •The new “smarts” •Marked text •Hardware keyboard
![Page 122: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/122.jpg)
•Multilingual •Being aware of context •The new “smarts” •Marked text •Hardware keyboard
![Page 123: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/123.jpg)
James Magahern, iOS Keyboards
•Creating Custom Input Views •Accessible input for cats, dogs, and more
![Page 124: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/124.jpg)
![Page 125: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/125.jpg)
![Page 126: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/126.jpg)
![Page 127: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/127.jpg)
Custom Accessible Input Views for Pets
![Page 128: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/128.jpg)
Custom Accessible Input Views for Pets
Our pets have no way to talk back
![Page 129: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/129.jpg)
Custom Accessible Input Views for Pets
Our pets have no way to talk back
Cats and dogs have trouble using QWERTY
![Page 130: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/130.jpg)
Custom Accessible Input Views for Pets
Our pets have no way to talk back
Cats and dogs have trouble using QWERTY
Limited vocabulary
![Page 131: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/131.jpg)
![Page 132: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/132.jpg)
![Page 133: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/133.jpg)
UIInputView
UIInputViewController
![Page 134: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/134.jpg)
UIInputView
UIInputViewController
![Page 135: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/135.jpg)
textDocumentProxy
UIInputView
UIInputViewController
![Page 136: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/136.jpg)
Providing a Custom Input View
class ConversationViewController: UITableViewController, UITextViewDelegate {
![Page 137: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/137.jpg)
Providing a Custom Input View
class ConversationViewController: UITableViewController, UITextViewDelegate {
private let customInputView = AnimalInputView()
override var canBecomeFirstResponder: Bool { return true }
![Page 138: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/138.jpg)
Providing a Custom Input View
class ConversationViewController: UITableViewController, UITextViewDelegate {
private let customInputView = AnimalInputView()
override var canBecomeFirstResponder: Bool { return true }
override var inputView: UIInputView? { // Return an instance of our custom UIInputView subclass return customInputView } // ... other code ... }
![Page 139: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/139.jpg)
Screenshot of the pet keyboard running in Messages
![Page 140: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/140.jpg)
James Magahern, iOS Keyboards
•Demo •Converting to a keyboard extension
![Page 141: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/141.jpg)
Converting to a Keyboard Extension
![Page 142: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/142.jpg)
Converting to a Keyboard Extension
Create a new target
![Page 143: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/143.jpg)
Converting to a Keyboard Extension
Create a new target
Set up your UIInputViewController subclass
![Page 144: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/144.jpg)
Converting to a Keyboard Extension
Create a new target
Set up your UIInputViewController subclass
Users can now enable keyboard from your settings bundle
![Page 145: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/145.jpg)
New APIs in iOS 11NEW
![Page 146: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/146.jpg)
New APIs in iOS 11
Selected text
NEW
![Page 147: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/147.jpg)
New APIs in iOS 11
Selected text
documentIdentifier handle
NEW
![Page 148: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/148.jpg)
New APIs in iOS 11
Selected text
documentIdentifier handle
Ability to query for full access
NEW
![Page 149: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/149.jpg)
Other Third Party Keyboard APIs
![Page 150: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/150.jpg)
Other Third Party Keyboard APIs
Incorporate the system input menu
![Page 151: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/151.jpg)
Other Third Party Keyboard APIs
Incorporate the system input menu
Personalization with the supplementary lexicon
![Page 152: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/152.jpg)
Other Third Party Keyboard APIs
Incorporate the system input menu
Personalization with the supplementary lexicon
Multilingual support
![Page 153: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/153.jpg)
Designing for User Trust
![Page 154: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/154.jpg)
Designing for User Trust
Privacy
![Page 155: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/155.jpg)
Designing for User Trust
Privacy
Enhance with user data
![Page 156: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/156.jpg)
Designing for User Trust
Privacy
Enhance with user data
Requesting full access
![Page 157: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/157.jpg)
Full Access and Privacy
![Page 158: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/158.jpg)
Full Access and Privacy
Value in not asking for full access
![Page 159: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/159.jpg)
Full Access and Privacy
Value in not asking for full access
Communicating with your main app
![Page 160: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/160.jpg)
Full Access and Privacy
Value in not asking for full access
Communicating with your main app
Networking
![Page 161: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/161.jpg)
Full Access and Privacy
Value in not asking for full access
Communicating with your main app
Networking
Current location
![Page 162: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/162.jpg)
Full Access and Privacy
Value in not asking for full access
Communicating with your main app
Networking
Current location
Address book
![Page 163: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/163.jpg)
Full Access and Privacy
Value in not asking for full access
Communicating with your main app
Networking
Current location
Address book
Keyboard needs to work without it
![Page 164: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/164.jpg)
Summary
Design your app with the keyboard in mind
Use advanced traits to enhance the user’s experience
Building keyboard extensions is a lot easier than you think
![Page 165: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/165.jpg)
More Informationhttps://developer.apple.com/wwdc17/242
![Page 166: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/166.jpg)
Related Sessions
Introducing Password AutoFill for Apps WWDC 2017
Localizing for Xcode 9 WWDC 2017
Increase Usage of Your App With Proactive Suggestions WWDC 2016
Internationalization Best Practices WWDC 2016
Mysteries of Auto Layout, Part 1 WWDC 2015
![Page 167: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/167.jpg)
Labs
Cocoa Touch and Haptics Lab Technology Lab C Fri 12:00PM–1:50PM
![Page 168: •The Keys to a Better Text Input Experience · 2017-06-10 · Shuchen Li, iOS Keyboards James Magahern, iOS Keyboards •The Keys to a Better](https://reader033.vdocuments.mx/reader033/viewer/2022050113/5f4a6cab2206571af9473541/html5/thumbnails/168.jpg)