I have used ObjC, and xib for years, now moving to Swift/Autolayout, I got a very stupid mistake, I have a hello world app with a button, Autolayout is set to show button on the middle of the screen X n Y
When I try "View as:" it shows in the middle for all screens iPhone 7p, 7, SE, 4S... it shows the button in the middle. But the button is not showing on my modal ViewController
Here how I show it,
@IBAction func buttonPresse(_ sender: AnyObject) {
let modalViewController = Modal1ViewController()
modalViewController.modalPresentationStyle = .overCurrentContext
present(modalViewController, animated: true, completion: nil)
}
And this to color background on shown modal
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = UIColor.green
view.isOpaque = false
}
Thats all!, why is my button not showing :/ thx!