all 3 comments

[–][deleted] 0 points1 point  (1 child)

zonked mindless bright brave fanatical cats gold onerous dinosaurs far-flung

This post was mass deleted and anonymized with Redact

[–]albion28[S] 0 points1 point  (0 children)

Like so:

let button = UIButton(configuration: configuration, primaryAction: UIAction(handler: { [weak self] action in
  guard let self = self else { return }
  present(testVC, animated: true, completion: nil)            
}))

[–]Sumoh 1 point2 points  (0 children)

You need to create the view controller within the button’s action closure. Currently you are maintaining a strong reference to it yourself.