UIDocumentBrowserViewController: Animationen inkonsistent

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • UIDocumentBrowserViewController: Animationen inkonsistent

    Moin,

    Nachdem ich einige Stunden versuchte, die Animationen zwischen UIDocumentBrowserViewController und dem aufgerufenen (eigenen) View Controller sauber hin zu bekommen, habe ich festgestellt, dass selbst der Apple-Beispielcode den gleichen Fehler aufweist. Hier zur Info / für's Archiv, falls jemand über das gleiche Problem stolpert:

    Man kann für die Animation den standardmäßigen TransitionController durch transitionControllerForDocumentAtURL: nutzen und falls man die richtige targetView spezifiziert, bekommt man eine tolle Animation: Zoom-in vom Thumbnail der selektierten Datei auf die angegebene View des eigenen View Controllers und beim Dismiss wieder zurück - selbst wenn sich die Position der Datei z. B. im Verlauf geändert hat.

    Das funktioniert allerdings nur im "Recents" (Verlauf) des Document Browsers oder bei lokalen Speicherorten. Wählt man eine Datei auf "iCloud Drive", findet keine Animation statt - bei der selben Datei über "Recents" schon. Sichtbar gut bei langsamen Animationen im Simulator oder mit einem Screen-Recording auf einem Device.

    Ich hatte ein Problem in meiner App vermutet und gesucht, bis ich am Ende (ich Trottel!) dann mal Apple's Sample App "Particles" probierte: Gleiches Problem, Bug-Report ist raus - auch wenn ich nicht auf eine Behebung hoffen.

    Mattes

    Apple FB 13669378 schrieb:

    Transitions from UIDocumentBrowserViewController to a custom view controller are inconsistent using the provided transition controller (transitionControllerForDocumentAtURL:). If a file is picked from "Recents" or from a local storage location (e.g. "On my iPad), the zoom-in / zoom-out works as expected. But if a file is selected from an iCloud location (not from "Recents") no transition is animated, although the same file picked from "Recents" is presented with a transition. This applies also to Apple's "Particles" sample code.

    Steps to reproduce: Download and build the "Particles" app (link below). Place the provided sample file "BlankFile.particles" on an iCloud Drive location (creating a new file in the app fails due to security scoping issues). Build / launch the app and open the particles file using the "iCloud Drive" storage location in the document browser: The particle file is presented without any animation. Close the file view controller and select the same file from "Recents": The file view controller is shown with a zoom-in / dismissed with a zoom-out animation. Use screen recording on a device for slow motions of the transition or slow down animations in the simulator.

    <developer.apple.com/documentat…ile_formats?language=objc>
    Diese Seite bleibt aus technischen Gründen unbedruckt.