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 show toast on top instead of bottom of screen. #102

Open
sudhanshutil opened this issue May 10, 2017 · 5 comments
Open

How to show toast on top instead of bottom of screen. #102

sudhanshutil opened this issue May 10, 2017 · 5 comments
Labels

Comments

@sudhanshutil
Copy link

No description provided.

@devxoul
Copy link
Owner

devxoul commented May 16, 2017

This is not yet supported.

@Pedroalexandrelopes
Copy link

Pedroalexandrelopes commented Jun 1, 2017

I think you can use something like this:

let marginTop:CGFloat = 80.0
ToastView.appearance().bottomOffsetPortrait = max(UIScreen.main.bounds.width, UIScreen.main.bounds.height) - marginTop
ToastView.appearance().bottomOffsetLandscape = min(UIScreen.main.bounds.width, UIScreen.main.bounds.height) - marginTop

@frakman1
Copy link

Thank you @Pedroalexandrelopes. Where would I put this code exactly?

@Pedroalexandrelopes
Copy link

You use this on application or ViewController startup

@Coeur Coeur added the question label Apr 3, 2019
@trunghvbk
Copy link

I created this PR to resolve this issue, please take a look
#221

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

No branches or pull requests

6 participants