Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to choose the standard UI design? #49

Closed
NickG-DK opened this issue Sep 7, 2022 · 1 comment
Closed

How to choose the standard UI design? #49

NickG-DK opened this issue Sep 7, 2022 · 1 comment

Comments

@NickG-DK
Copy link

NickG-DK commented Sep 7, 2022

Great work you have been doing, but I was wondering how I could choose the standard UI design, that is being showcased in the showroom.

@aheze
Copy link
Owner

aheze commented Sep 7, 2022

Thanks! Just use Templates.Container.

.popover(
    present: $present,
    attributes: {
        $0.sourceFrameInset.top = -8
        $0.position = .absolute(
            originAnchor: .top,
            popoverAnchor: .bottom
        )
    }
) {
    Templates.Container(
        arrowSide: .bottom(.mostClockwise),
        backgroundColor: .green
    ) {
        Text("This is a pretty standard-looking popover with an arrow.")
            .foregroundColor(.white)
    }
    .frame(maxWidth: 300)
}

All the showroom examples and various other templates can be found in the example app: https://github.com/aheze/Popovers/raw/main/Examples/PopoversXcodeApp.zip

@aheze aheze closed this as completed Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants