repeat appearing
AbdulazizAlmohsen opened this issue · 4 comments
AbdulazizAlmohsen commented
I tried this code but it keeps coming again and again when I click on continue. I implement it in viewDidAppear
let whatsNew = WhatsNewViewController(items: [
WhatsNewItem.image(title: "Nice Icons", subtitle: "Completely customize colors, texts and icons.", image: #imageLiteral(resourceName: "lgoJaee")),
WhatsNewItem.image(title: "Such Easy", subtitle: "Setting this up only takes 2 lines of code, impressive you say?", image: #imageLiteral(resourceName: "lgoJaee")),
WhatsNewItem.image(title: "Very Sleep", subtitle: "It helps you get more sleep by writing less code.", image: #imageLiteral(resourceName: "lgoJaee")),
WhatsNewItem.text(title: "Text Only", subtitle: "No icons? Just go with plain text."),
])
whatsNew.titleText = "What's New"
whatsNew.buttonText = "Continue"
present(whatsNew, animated: true, completion: nil)
how can I dismiss it and never appear again?
BalestraPatrick commented
You should check if you can present the view first like it is shown in the Example app.
More precisely, wrap your code in an if statement:
if WhatsNew.shouldPresent() {
// Your code here
}
AbdulazizAlmohsen commented
I get this error Module 'WhatsNew' has no member named 'shouldPresent'
even in the example app
BalestraPatrick commented
You should run pod update
to make sure you have the latest version. I was just able to create a project from scratch and I saw no error.
AbdulazizAlmohsen commented
great thank you 👍