Closed christophriepe closed 4 years ago
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 ItemsView.ContentMode
to .center
the default behaviour as seen in the example application is .top
.
// 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 now chose the example images in the Example folder but this wasn't the issue. It is still looking the same way as before.
To see the whole source code for this WhatsnewViewController see the linked StackOverflow Question, as well as for the error messages. https://stackoverflow.com/questions/61372170/how-to-fix-layout-error-while-using-whatsnewkit-library-in-swift-5
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. Please try the same with a small example app to encapsulate the bug.
It might be that somewhere in your code the ItemsView Configuration gets set to center
.
Thanks for your answer @SvenTiigi, that fixed the first problem I had.
However in all examples the
Item View
takes the whole available space like in the image below:
Why is my
Item View
(or the one in the example app of your last post) only taking more or less a quarter of The available space?
Is there any configuration to let the Item View
fill out all the available space?
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.