Skip to content

Using UIWindow for layout size #150

@andreyrd

Description

@andreyrd

LightboxController:261 attempts to get the size for the scroll view from UIApplication.shared.delegate?.window??.bounds.size, which assumes that you have that implemented.

Maybe something like UIApplication.shared.keyWindow could be used instead? I'm not sure if implementing UIApplicationDelegate.window is a common enough convention that this issue doesn't matter, but it's definitely something I ran into! :)

Edit:
I can open a PR that uses UIApplication.shared.keyWindow if I get the go ahead. Perhaps I can even have it use keyWindow just as a ?? fallback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions