Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Split view on iPad doesn’t load anything initially #360

Open
friedbunny opened this issue Sep 20, 2019 · 1 comment
Open

Split view on iPad doesn’t load anything initially #360

friedbunny opened this issue Sep 20, 2019 · 1 comment
Labels

Comments

@friedbunny
Copy link
Contributor

friedbunny commented Sep 20, 2019

When launching the app on iPad, our UISplitViewController defaults to showing the child view controller (i.e., the map/example), but this view controller does not load anything until an example is tapped in the primary (menu table view) controller.

This means that UI tests aren’t able to start on iPad, because the elements it expects are not available.

We may need to fiddle with this property:

self.splitViewController.preferredDisplayMode = UISplitViewControllerDisplayModeAllVisible;

Screenshots

Nothing loads initially

Screen Shot 2019-09-20 at 12 55 08 PM

Rotating the screen a few times brings up the primary controller

Screen Shot 2019-09-20 at 12 55 31 PM

/cc @captainbarbosa @julianrex @lloydsheng

@friedbunny friedbunny added the bug label Sep 20, 2019
@tsuz
Copy link
Contributor

tsuz commented Apr 1, 2020

This seems to occur on iOS 13 on iPad where the viewDidLoad is too late (ref)... A workaround for me was to add:

-(void)awakeFromNib {
    [super awakeFromNib];
    // The menu and example view controllers are displayed side-by-side onscreen.
    self.splitViewController.preferredDisplayMode = UISplitViewControllerDisplayModeAllVisible;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants