Skip to content

[iOS] Flat action bar messes up style of UIDocumentInterationController #5768

Closed

Description

@PeterStaev

Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?

Yes

Tell us about the problem

If you have a normal action bar, when you use utils.ios.openFile the presented UIDocumentInteractionController inherits the color of the action bar on the page. But as soon as apply flat="true" to the action bar this no longer works like that and the action bar resets to the default one in the UIDocumentInterationController.

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.4
  • Cross-platform modules: 3.4

Please tell us how to recreate the issue in as much detail as possible.

https://play.nativescript.org/?template=play-tsc&id=l8dFks&v=2
Tap on download file and wait for the file to open. The action bar will turn back to the default one. Also when you navigate back to the page there is an ugly "flickering" from the default to the red styled action bar.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

  1. PeterStaev commented on May 2, 2018

    @PeterStaev
    ContributorAuthor

    Workaround

    Set the action bar's flat property to false before opening the file and then set it back to true

    const ab = page.getViewById<ActionBar>("ab");
    ab.flat = false;
    utils.ios.openFile(path);
    setTimeout(() => ab.flat = true, 1)
  2. PeterStaev commented on Jun 7, 2018

    @PeterStaev
    ContributorAuthor

    With 4.1 seems this issue is now non-relevant. Now when you open a file it seems to open it in a modal dialog which uses the default white action bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions