Posts

Showing posts with the label viewcontroller

Presenting viewcontroller over current context is modal and does not rotate correctly

Image
Clash Royale CLAN TAG #URR8PPP Presenting viewcontroller over current context is modal and does not rotate correctly This is with iOS 11.4, Swift 4 and XCode 9. Im trying to present a viewcontroller over current context, so that the underlying context gets dimmed but still visible. I do this with following code: let storyboard = UIStoryboard(name: "Main", bundle: nil)l let vc = storyboard.instantiateViewController(withIdentifier: "LoginView") as! LoginViewController vc.modalPresentationStyle = .overCurrentContext vc.modalTransitionStyle = .coverVertical present(vc, animated: true, completion: nil) let ppc = vc.popoverPresentationController ppc?.sourceView = tableView ppc?.sourceRect = tableView.bounds ppc?.delegate = vc LoginViewController has a view (popview) centered in it's mainview which contains my editable controls. This works initially fine but I got a few problems: I tried to fix problem 1 by using a passtrough view for the LoginViewController's ma...