tvOS search: grid keyboard will not slide when search results are focused - uikit

I am working on a tvOS application with a UISearchController. I have a problem when the grid keyboard is selected in the settings (Settings->General->Keyboard Layout).
Expected behavior
When the search results are focused, I expect the keyboard to slide to the leading edge to let the search results fill all the available width. This is the standard behavior in all Apple applications. But I can't get that behavior. The keyboard will stay when the search results are focused.
What I tried
I followed the video Discover search suggestions for Apple TV (the only one I could find where this topic was dealt with) and did everything mentioned:
Embed the UISearchController inside a UISearchContainerViewController (and the tab bar view controller is embed in a UINavigationController)
Set the collection view of the search results controller as the observed one with setContentScrollView(_) in the search results controller (as explained in the doc). searchControllerObservedScrollView being deprecated.
In the video, the behavior I expect is mentioned, and it seems that no additional steps are required to obtain it (~ 9'52''):
Our keyboard is highly adaptable to various languages and input methods. You should consider this when laying out your search results. Here are a few examples of alternate layouts. For people using IR remotes, we'll display a grid keyboard. While typing, the search results will only occupy some of the screen width, and then they'll slide in to fill the screen when focused.
Since we have to provide the search results view controller to the search controller, we don't have much control over the view hierarchy. Thus it seems quite natural that this behavior would come without extra work.
Environment
tvOS 15
UIKit
The problem exists on the Simulator as well as on the Apple TVs I tested: 4K (2nd generation) and HD
Other apps
Some apps like YouTube and Spotify expose the behavior I want. But I wonder if their search tab is implemented using UIKit or TVMLKit.
Follow up
This question is also asked on the Apple Developer Forums
I filed a bug through Feedback Assistant two months ago but did not get any answer so far. Still open.

Related

What could possibily slow down my flex mobile application?

I am working with flex for the last two years on some desktop apps. Until now I never had any performance related issues but today as we completed a mobile application for the iPad, I'm facing a challenge, the application is incredibly slow on the iPad.
http://i.stack.imgur.com/qkbWn.png
Slow, means that when I press a button in the menu to change the splitview I must wait something like 5s. Then scrolling is really slow two, with less than one fps and my TextInput starts to bug (the text is not in his box anymore).
I started to read a lot of blog post and presentation about optimisation for the mobile platform and then I rewrite some of the components I use. I removed the SkinnableContainer for instance and replaced it by a VGroup including some actionScript based drawing.
Now what you see is a VGroup (the dark grey one) containing some others VGroup (the group with title here) and then each widget is an HGroup with a label and a Widget. I only use Label and TextInput for the text.
Creation time is slow even (several seconds to create the view) for another page where there is only 4 text widget on it, or another one with only a list with a custom item renderer where each row is a set of 4 labels.
The whole things is cabled with RobotLegs, with nothing fancy, one models is injected in the view and at the beginning I set a member variable on the view with this object to bind my variables.
Frankly my thinking right now is : it smells fishy because if I've done everything right it is impossible to have such low performance and thinks that flex is competitive on the mobile platform. So right now I'm trying to disable the application piece by piece to try to locate what could slow it like that. I've got a couple suspects to check, for instance I've got some binding warning to check, and then see if robotlegs has got its share of the problem.
So my main question here is what do you think, and could you have some ideas about "is there a problem" and "how do we solve it".
Thanks
Run profiler for startup and separatelly for each operation that takes longed that it needs. Then prioritize the problems and try to solve them with basic optimization techniques.
Some problems you will not be able to solve fast - e.g. time for creating big components. The only option there is to rewrite those components with AS3 without MXML, styles and anything. I'm sure that flash.text.TextField is created many times faster than mx.controls.Label. The same for other components.
When component is created, it can be reused at a very low price. In your app there must be a lot of places where you recreate while you can reuse old components. It will save you memory and time.
Layouts tend to redraw even when it's not needed. If you have a lot of nested layouts, find the most critical places and replace a series of layouts with one custom layout or even component.
This all is very developer time consuming. At the end you will not get a smooth app anyway, but I believe that it can become usable.

Create multiple page form in Cocoa

I want to create a form with iOS like transitions (in a Cocoa desktop application) between the form input. For instance, the user would input information to the form and click next to continue to input the remainder of the information. On the last form, the user would click submit. Upon clicking next, the form would have an animated transition, like on the iPhone before displaying the next set of forms. Sort of like how Turbo Tax ask a ton of questions before allowing you to submit that grouped information.
What would be the best approach to achieve this goal?
This is commonly referred to as a wizard.
You basically have two options:
Use a tabless tab view, following Apple's sample code in AnimatingTabView from http://developer.apple.com/library/mac/#samplecode/Reducer/Introduction/Intro.html
Manually swap the views in and out yourself.
There are pros and cons to both approaches. Which you choose will probably depend on your requirements. One issue with Core Animation on the desktop is lack of subpixel rendering for layer-backed views. This is mostly an issue with text display but some people find it not to be an issue.
I've needed this functionality a few times. I used this tutorial to get started.

Windows Phone 7 Map List Best Practices

On the IPhone, the map control allows you to switch between a list mode and map mode easily. I've been trying to find examples of this for WP7 but am at a loss.
Is there a best practice for implementing a list of objects on a map?
If not, do we just do it manually, I.E. Save the dataset and display it as a listbox or something?
If you do it manually, where is the best place to put a button to switch you between the 2 screen styles? I feel like that app bar isn't right.
I don't want to copy the IPhone UI standard and have a button in the title bar, although I'm running out of options.
For one "best practice" I'd take a look at how the default Bing Maps app works - it provides a "results list" text menu item accessible from the ApplicationBar - and this is displayed via a full screen dialog (at least I think that's what it is).
However, that is only one "best practice" - I don't think their UI is perfect for all apps.
Application bar is fine, just make sure the buttons are in the same positions for each bar and that toggling views 10 times does not require pressing Back 10 times to go to the previous page, maybe use a different page transition so it doesn't feel like every other transition on the app.

How to design GUI to navigate through multiple hierarchies?

I would like to design a GUI dashboard for a document management application. The dashboard contains only documents thumbnails. Each document may belong to a few hierarchies (e.g. "topic" hierarchy, "language" hierarchy, "genre" hierarchy, etc.) A user may want to select math texts in English, or lyrics in all Roman languages, etc.
How would you design a GUI for this ? What if the dashboard runs in a multi-touch tablet device ? What are examples of such GUI ?
I sketched these examples that would work with mouse or touch:
1) Dropdown Tags: You can use a approach similar to what Delicious do with tags, but put tags under hierarchies which you can chose on dropdown menus right on the top. The documents are filtered on real time while you choose the filters. It would be interesting to save an old filters for quickly navigation.
2) CheckBox: If you have few filter and options you can keep a bunch of checkbox on the side and filter the documents on real time:
However, it is hard to come with a UI like that, I think you should prototype and ask for the user to test what is better.
When you design a UI interface, remember that the user has to know where they are in a system. They need to know what they can do next; and what will happen when they do it and get there.
The most intuitive GUI for any user will be one whose interface they're already familiar with.
This way, they won't have to spend time thinking about what would happen when they perform a certain action.
Browser UI's and File explorer UI's are some such examples.
Hovering on a file to see a semi-transparent pop-up which lists options of what to do with the file is another way to enhance usability without cluttering the screen with navigation aids. (this works even for multitouch screens)

Implementing "scrubby sliders" in Cocoa?

How would I go about implementing something along the lines of "scrubby sliders", like in Photoshop and quite a few other image-processing applications?
They are slightly hard to describe.. basically you have a regular numeric input-box, but you can click-and-hold the mouse button, and it functions like a slider (until you release). If you click in the box, you can select text, edit/paste/etc as usual.
The Photoshop docs describe it, and I put together a quick example video (an example of the sliders in Shake)
Another similar implementation would be the jog-wheel in Final Cut Pro, which functions similarly, without the numeric readout being underneath.
I can't seem to find any mention of implementing these, although there is probably alternative names for this. It is for a OS X 10.5 Cocoa application.
It is for a colour-grading application, where a user might need to make tiny adjustments (0.001, for example), to huge adjustments (say, -100 +100) on the same control. A regular slider isn't accurate enough over that range of value.
Copy-and-pasting values into the box would be a secondary concern to scrubbing the values, and the Photoshop/Shake setup really well. The unobviousness of the control is also of a low concern, as it's not a "regular desktop application"
I've encountered those. They suck, because they prevent the user from dragging to select the text of the number.
A better idea would be a miniature slider beneath the field that expands to a full-size slider when the user holds down the mouse button on it and collapses back to its miniature size when the user releases the mouse button. This way, the selection behavior is still available, but you also provide the slider—and in a more obvious way.
There's no built-in class in Cocoa for either one. You'll have to implement your own.
I doubt that this exists in Cocoa framework. As far as I remember it is not mentioned in the Apple Human Interface Guidelines.
You can develop one yourself by using a custom view and tracking mouse events (-mouseDown:, mouseUp:, -mouseDragged:).

Resources