I am writing UIAlert and UIAlertAction and I want to add performSeque to handler in UIAlertAction but I keep getting this error: "Cannot use instance member 'performSegue' within property initializer; property initializers run before 'self' is available"
here is my code let alert = UIAlertController(title: "Title", message: "Message", preferredStyle: .alert)
let action = UIAlertAction(title: "Title", style: .default, handler: { action in
performSegue(withIdentifier: "goToVC", sender: nil)
})
Post
Replies
Boosts
Views
Activity
I am trying to present another ViewController from storyboard when app launches, for example like from WhatsNew Kit or Welcome Screen but it is custom made is it possible? If so how do I present it