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 fix Layout Error while using WhatsNewKit Library in Swift 5? #39
Comments
Hey @christophriepe, it seems like you are using a non transparent image or loading the UIImage via the provided name fails this is why the image get tinted in its full bounds. If you want to disable the default autoTintImage behaviour you can simply change the ItemsView configuration. configuration.itemsView.autoTintImage = false As the ItemsView is centered it seems like you are setting the // ContentMode Top
configuration.itemsView.contentMode = .top
// ContentMode Center
configuration.itemsView.contentMode = .center
// ContentMode Fill
configuration.itemsView.contentMode = .fill Please provide a code snippet of your WhatsNewViewController configuration and presentation in order to identify the misconfiguration. |
Thanks for your answer @SvenTiigi. Here is my code for the configuration: let theme = WhatsNewViewController.Theme { configuration in
configuration.completionButton.backgroundColor = UIColor.yellow
configuration.completionButton.titleColor = UIColor.black
configuration.itemsView.contentMode = .top
}
let config = WhatsNewViewController.Configuration(theme: theme)
I hope you guys can see something I can't. Thanks a lot for your help in advance. |
Hey @christophriepe, I've created an example app and added your provided code snippet. The ItemsView is correctly displayed at the top position. It might be that somewhere in your code the ItemsView Configuration gets set to |
Thanks for your answer @SvenTiigi, that fixed the first problem I had.
Is there any configuration to let the |
To fill the available space along the axis configuration.itemsView.contentMode = .fill https://github.com/SvenTiigi/WhatsNewKit#contentmode- Additionally, you can make use of the Insets API to modify the size of the ItemsView |
Thanks, @SvenTiigi, its working now! |
Hey,
I ran into an error while using WhatsNewKit. I posted a Question on StackOverflow. Here is the link: https://stackoverflow.com/questions/61372170/how-to-fix-layout-error-while-using-whatsnewkit-library-in-swift-5
Can you think of a reason why this is happening to me?
Thanks a lot for your help in advance.
The text was updated successfully, but these errors were encountered: