Focus on iPad keyboard navigation

RSS for tag

Discuss the WWDC21 session Focus on iPad keyboard navigation.

Posts under wwdc21-10260 tag

14 Posts

Post

Replies

Boosts

Views

Activity

Disable the focus system for a MacCatalyst app
I'm building a MacCatalyst app, where the Tab key is used for a special functionality within the app. For that, I inserted a UIKeyCommand in the main menu for "\t". When I press Tab, the default functionality takes over, and the focus moves to a button in the toolbar and stays there, which I don't want. As a result, the action of my key command is not called. I set tabKeyCommand.wantsPriorityOverSystemBehavior = true, but it makes no difference. The root view controller of my app is an UISplitViewController. I overloaded 'shouldUpdateFocus(in:)' and always return false hoping that this will disable moving the focus for the whole app, but it's not working. It looks like it's more difficult then needed. How can I instruct the system to not interfere with the Tab key?
1
0
1.1k
Feb ’22
How to move title from left to right
Hey, Want to move the title from left to right struct HomeView: View {   var body: some View {     NavigationView {       ZStack {         LinearGradient(gradient: /*@START_MENU_TOKEN@*/Gradient(colors: [Color.red, Color.blue])/*@END_MENU_TOKEN@*/, startPoint: /*@START_MENU_TOKEN@*/.leading/*@END_MENU_TOKEN@*/, endPoint: /*@START_MENU_TOKEN@*/.trailing/*@END_MENU_TOKEN@*/)       }       .navigationTitle("בית")       .edgesIgnoringSafeArea(.all)       .opacity(0.3)     }   } } Thanks in advance for the answers!
1
0
969
Feb ’22
Point Scanning in API docs
Based on documentation, I would assume item scanning in Accessibility mode's Switch Control utilizes the underlying API - Focus-based Navigation from UI Kit (please correct me if I'm wrong). Where is the documentation for the other type of scanning it shows in the above link, point scanning? Thanks.
0
0
635
Jan ’22
Keyboard is typing two or more letters at once
Hi Support, Recently I have upgraded my laptop to MacOS Monterey and after upgrading the laptop to Monterrey, keyboard typing two or more letters at once. It just happen on login screen and all the keys work fine post login. This issue stops me to login into my laptop and everyone I have to use Safemode option check the keyboard behavior. Thank you. Regards, Anuj Kumar
0
0
790
Jan ’22
Floating keyboard on an iPhone?
An app store reviewer has rejected my build. With his message he posted a screenshot with a floating keyboard on an iPhone. I know this feature only from iPad OS. How can I enable a floating keyboard on an iPhone? Background: In this case I have implemented a MFMailComposeViewController as described in the documentation. No big deal, it works perfectly on all of my devices. The reviewer claims that it will not work / not dismiss on his device, posting this weird screenshot.
0
0
2.0k
Jan ’22
UIKeyCommand in QLPreviewController in iOS 15
With iOS 15 there are changes to keyboard handling. Besides usual overriding of keyCommands a programmer has to assign own commands higher priority than system commands. So, the following code works for me: final class MyViewController: UIViewController { override var keyCommands: [UIKeyCommand]? { let action = UIKeyCommand(input: UIKeyCommand.inputUpArrow, modifierFlags: [], action: #selector(myAction)) if #available(iOS 15, *) { action.wantsPriorityOverSystemBehavior = true } return [action] } // rest of the code } On the other hand, almost the same code but with inheriting from QLPreviewController doesn't work: final class PreviewViewController: QLPreviewController { // same internals as above } In view hierarchy I spotted that there is actually some kind of extra navigation, maybe that is stealing my keyboard presses, maybe that's why above code isn't working. Does anyone have an idea how to fix or workaround this issue? Obviously, the extra navigation is from Apple and I don't have access to these extra presented controllers. I was trying to print the following details, but neither helps: print(presentedViewController ?? "none") // output: none print(topMostViewController) // output: <MyApp.PreviewViewController: 0x7fbe44156203> print(inputViewController ?? "none") // output: none It's worth to add I've also tried to add method override func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent?) { print("test?") super.pressesBegan(presses, with: event) } And test never appears in the console, whatever button I press. So clearly something else steals the key presses. This did not happen before iOS 15. I conclude it, thinking it may be a bug in the API. Probably just no one thought of this scenario when adding the new keys..?
0
0
681
Dec ’21
How to initially enable focus in a collection view programmatically?
Hi I've set up a list UICollectionView with focus (without selectionFollowsFocus as I must distinguish between focus and selection by tap) Everything is working correctly, except I'm trying to setup the first cell as focused on startup, without the user having to use tab/down key initially. I've tried: calling setNeedsFocusUpdate() and updateFocusIfNeeded() setting 1st cell in preferredFocusEnvironments and indexPathForPreferredFocusedView setting focusGroupPriority to different values (even Int.max) directly on the cell But initial focus is not set. Enabling focus loop debugger correctly shows the 1st cell as the 'next' focused element, but I cannot figure out how to actually trigger it without external keyboard. Thanks
1
0
1.7k
Sep ’21
Suggestion
hello , I had a idea I wanted to share with someone from apple ! My idea was to make a app on iPhones where parents could control there kids iPads or iPhones and connect it via a app to change videos or certain items , for instance I travel a lot and my 9 month old daughter gets FaceTime calls from family members on her iPad , if I would be able to answer those calls or change certain videos without actually having to grab her iPad from the back seat it would make it sooooo much better !! Endless ideas I have !! Please reach out so I can explain more !!
1
0
527
Aug ’21
iPad keyboard navigation: where to initialize UIFocusHaloEffect
WWDC21 Session Focus on iPad keyboard navigation says that we can use UIFocusHaloEffect to change the appearance of focused items. On iPadOS, we can use this effect by assigning a UIFocusHaloEffect to the focusEffect property like so: self.focusEffect = UIFocusHaloEffect() What wasn't very clear is where should we put this code when working with UICollectionViewCell. I am doing it in the collectionView(_:canFocusItemAt:) method: func collectionView(_ collectionView: UICollectionView, canFocusItemAt indexPath: IndexPath) -> Bool { guard #available(iOS 15.0, *) else { return false } guard let cell = collectionView.cellForItem(at: indexPath) as? FeedCollectionViewCell else { return false } if cell.focusEffect == nil { cell.focusEffect = UIFocusHaloEffect(roundedRect: cell.artworkImageView.frame, cornerRadius: cell.cornerRadius, curve: .continuous) } return true } Is this the best way to implement it?
1
0
1.2k
Aug ’21
iOS 15 Focus Issue with watch
When a focus is turned on with my iPhone, I still received blocked notifications on my watch. My watch is on ios8 beta and the mirror notifications setting is turned on both with the iPhone focus settings and Apple Watch focus settings.
0
0
538
Aug ’21
I'm using iOS 14.6 on iPad and accessing the Custom Fiori Client build with KAPSEL SDK 3.02 PL02. We are facing a weird issue in navigating from one UI control(input) to another(input) in sap.m.table by using the up and down arrows on the keypad.
We are using iOS 14.6 on iPad and accessing the Custom Fiori Client build with KAPSEL SDK 3.02 PL02. We are facing a weird issue in navigating from one UI control(input) to another(input) in sap.m.table by using the up and down arrows on the keypad. The cursor skips the input fields which are available in one single row. Please guide us if this is a known issue?
0
0
441
Jul ’21
How to disable UIFocus on iPad?
I'm encountering problems in an existing app from the addition of the UIFocus engine in iPadOS 15, which I'm not able to address at this time. Is it possible to disable UIFocus for the entire app?
Replies
1
Boosts
0
Views
1.2k
Activity
Apr ’22
Disable the focus system for a MacCatalyst app
I'm building a MacCatalyst app, where the Tab key is used for a special functionality within the app. For that, I inserted a UIKeyCommand in the main menu for "\t". When I press Tab, the default functionality takes over, and the focus moves to a button in the toolbar and stays there, which I don't want. As a result, the action of my key command is not called. I set tabKeyCommand.wantsPriorityOverSystemBehavior = true, but it makes no difference. The root view controller of my app is an UISplitViewController. I overloaded 'shouldUpdateFocus(in:)' and always return false hoping that this will disable moving the focus for the whole app, but it's not working. It looks like it's more difficult then needed. How can I instruct the system to not interfere with the Tab key?
Replies
1
Boosts
0
Views
1.1k
Activity
Feb ’22
How to move title from left to right
Hey, Want to move the title from left to right struct HomeView: View {   var body: some View {     NavigationView {       ZStack {         LinearGradient(gradient: /*@START_MENU_TOKEN@*/Gradient(colors: [Color.red, Color.blue])/*@END_MENU_TOKEN@*/, startPoint: /*@START_MENU_TOKEN@*/.leading/*@END_MENU_TOKEN@*/, endPoint: /*@START_MENU_TOKEN@*/.trailing/*@END_MENU_TOKEN@*/)       }       .navigationTitle("בית")       .edgesIgnoringSafeArea(.all)       .opacity(0.3)     }   } } Thanks in advance for the answers!
Replies
1
Boosts
0
Views
969
Activity
Feb ’22
Point Scanning in API docs
Based on documentation, I would assume item scanning in Accessibility mode's Switch Control utilizes the underlying API - Focus-based Navigation from UI Kit (please correct me if I'm wrong). Where is the documentation for the other type of scanning it shows in the above link, point scanning? Thanks.
Replies
0
Boosts
0
Views
635
Activity
Jan ’22
Keyboard is typing two or more letters at once
Hi Support, Recently I have upgraded my laptop to MacOS Monterey and after upgrading the laptop to Monterrey, keyboard typing two or more letters at once. It just happen on login screen and all the keys work fine post login. This issue stops me to login into my laptop and everyone I have to use Safemode option check the keyboard behavior. Thank you. Regards, Anuj Kumar
Replies
0
Boosts
0
Views
790
Activity
Jan ’22
Floating keyboard on an iPhone?
An app store reviewer has rejected my build. With his message he posted a screenshot with a floating keyboard on an iPhone. I know this feature only from iPad OS. How can I enable a floating keyboard on an iPhone? Background: In this case I have implemented a MFMailComposeViewController as described in the documentation. No big deal, it works perfectly on all of my devices. The reviewer claims that it will not work / not dismiss on his device, posting this weird screenshot.
Replies
0
Boosts
0
Views
2.0k
Activity
Jan ’22
UIKeyCommand in QLPreviewController in iOS 15
With iOS 15 there are changes to keyboard handling. Besides usual overriding of keyCommands a programmer has to assign own commands higher priority than system commands. So, the following code works for me: final class MyViewController: UIViewController { override var keyCommands: [UIKeyCommand]? { let action = UIKeyCommand(input: UIKeyCommand.inputUpArrow, modifierFlags: [], action: #selector(myAction)) if #available(iOS 15, *) { action.wantsPriorityOverSystemBehavior = true } return [action] } // rest of the code } On the other hand, almost the same code but with inheriting from QLPreviewController doesn't work: final class PreviewViewController: QLPreviewController { // same internals as above } In view hierarchy I spotted that there is actually some kind of extra navigation, maybe that is stealing my keyboard presses, maybe that's why above code isn't working. Does anyone have an idea how to fix or workaround this issue? Obviously, the extra navigation is from Apple and I don't have access to these extra presented controllers. I was trying to print the following details, but neither helps: print(presentedViewController ?? "none") // output: none print(topMostViewController) // output: <MyApp.PreviewViewController: 0x7fbe44156203> print(inputViewController ?? "none") // output: none It's worth to add I've also tried to add method override func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent?) { print("test?") super.pressesBegan(presses, with: event) } And test never appears in the console, whatever button I press. So clearly something else steals the key presses. This did not happen before iOS 15. I conclude it, thinking it may be a bug in the API. Probably just no one thought of this scenario when adding the new keys..?
Replies
0
Boosts
0
Views
681
Activity
Dec ’21
How to initially enable focus in a collection view programmatically?
Hi I've set up a list UICollectionView with focus (without selectionFollowsFocus as I must distinguish between focus and selection by tap) Everything is working correctly, except I'm trying to setup the first cell as focused on startup, without the user having to use tab/down key initially. I've tried: calling setNeedsFocusUpdate() and updateFocusIfNeeded() setting 1st cell in preferredFocusEnvironments and indexPathForPreferredFocusedView setting focusGroupPriority to different values (even Int.max) directly on the cell But initial focus is not set. Enabling focus loop debugger correctly shows the 1st cell as the 'next' focused element, but I cannot figure out how to actually trigger it without external keyboard. Thanks
Replies
1
Boosts
0
Views
1.7k
Activity
Sep ’21
Suggestion
hello , I had a idea I wanted to share with someone from apple ! My idea was to make a app on iPhones where parents could control there kids iPads or iPhones and connect it via a app to change videos or certain items , for instance I travel a lot and my 9 month old daughter gets FaceTime calls from family members on her iPad , if I would be able to answer those calls or change certain videos without actually having to grab her iPad from the back seat it would make it sooooo much better !! Endless ideas I have !! Please reach out so I can explain more !!
Replies
1
Boosts
0
Views
527
Activity
Aug ’21
magic keyboard
The trackpad and keyboard don't work properly on the 12.9-inch iPad Pro when you upgrade the iPados15
Replies
0
Boosts
0
Views
452
Activity
Aug ’21
iPad keyboard navigation: where to initialize UIFocusHaloEffect
WWDC21 Session Focus on iPad keyboard navigation says that we can use UIFocusHaloEffect to change the appearance of focused items. On iPadOS, we can use this effect by assigning a UIFocusHaloEffect to the focusEffect property like so: self.focusEffect = UIFocusHaloEffect() What wasn't very clear is where should we put this code when working with UICollectionViewCell. I am doing it in the collectionView(_:canFocusItemAt:) method: func collectionView(_ collectionView: UICollectionView, canFocusItemAt indexPath: IndexPath) -> Bool { guard #available(iOS 15.0, *) else { return false } guard let cell = collectionView.cellForItem(at: indexPath) as? FeedCollectionViewCell else { return false } if cell.focusEffect == nil { cell.focusEffect = UIFocusHaloEffect(roundedRect: cell.artworkImageView.frame, cornerRadius: cell.cornerRadius, curve: .continuous) } return true } Is this the best way to implement it?
Replies
1
Boosts
0
Views
1.2k
Activity
Aug ’21
iOS 15 Focus Issue with watch
When a focus is turned on with my iPhone, I still received blocked notifications on my watch. My watch is on ios8 beta and the mirror notifications setting is turned on both with the iPhone focus settings and Apple Watch focus settings.
Replies
0
Boosts
0
Views
538
Activity
Aug ’21
How to update latest software IPAD mini 9.3.6
I am unable to latest update software on my IPAD mini software. Please provide me assistance on same.
Replies
0
Boosts
0
Views
466
Activity
Jul ’21
I'm using iOS 14.6 on iPad and accessing the Custom Fiori Client build with KAPSEL SDK 3.02 PL02. We are facing a weird issue in navigating from one UI control(input) to another(input) in sap.m.table by using the up and down arrows on the keypad.
We are using iOS 14.6 on iPad and accessing the Custom Fiori Client build with KAPSEL SDK 3.02 PL02. We are facing a weird issue in navigating from one UI control(input) to another(input) in sap.m.table by using the up and down arrows on the keypad. The cursor skips the input fields which are available in one single row. Please guide us if this is a known issue?
Replies
0
Boosts
0
Views
441
Activity
Jul ’21