Registration with Popover - Step by step Swift 4

Asked

Viewed 29 times

0

Good morning, I have a problem using Popover, I need to do a step by step registration using Popover in the register, but when I try to close one Popover and open another, I’m not getting it closes the Pover I’m trying to open, follows below the code.

let storyboard : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "PopOverCadastroNome")
vc.modalPresentationStyle = .popover
present(vc, animated: true, completion:{()->Void in
      self.dismiss(animated: true, completion: nil)
})

1 answer

0

The code of completion will be executed as soon as the VC is presented, then as you called the dismiss in completion she will be dismissed as soon as she is presented. You can take a look at present method documentation to better understand

Browser other questions tagged

You are not signed in. Login or sign up in order to post.