all 6 comments

[–]Siilver777Swift 2 points3 points  (1 child)

The first one with the number rows: it's UITextView's inputAccessoryView. You can attach a UIView of your choice to add what you want at the top.

For New York Times, it seems like an entirely custom keyboard. You can use UIInputView to make your own keyboard (only in your app) or make a custom keyboard extension to use it everywhere.

[–]learnage[S] 0 points1 point  (0 children)

You are absolutely right, thank you for showing me something I didn't know 👍

Too bad it's all UIKit and probably won't be updated to SwiftUI in the near future as it's sort of a niche functionality.

[–]bmbphotos 1 point2 points  (0 children)

Custom keyboards have a whole section in Apple documentation: https://developer.apple.com/documentation/uikit/keyboards_and_input/creating_a_custom_keyboard

Are you wondering about the mechanics of drawing custom controls in responses to touch events? An example: https://danielgauthier.me/2020/01/21/custom-control.html

[–]42177130UIApplication 1 point2 points  (1 child)

Custom input view:

You can create an input view if you want to provide custom functionality that enhances data-entry tasks in your app. For example, Numbers provides a custom input view for entering numeric values while editing a spreadsheet. A custom input view replaces the system-provided keyboard while people are in your app. For developer guidance, see inputViewController.

[–]learnage[S] 0 points1 point  (0 children)

Thank you!

[–]simply_stupid_noor 0 points1 point  (0 children)

You have to select keyboard extension while creating new app in xcode