Post

Replies

Boosts

Views

Activity

Presenting ViewController with transparent background
I've got a menu UIViewController I slide in from the left. (Client requirement). Targeting 13.1 in Xcode 11.1. The issue I have is when I slide it in with my custom transition it hops down about 20 pixels. If I set the top of the presented ViewController down 20 pixels before sliding it in it doesn't do the hop. It looks like it's trying to fo the new card-like presentation. Using the UIModalPresentationStyle.fullScreen doesn't stop the hop. I need the transparent background anyway so UIModalPresentationStyle.overFullScreen or UIModalPresentationStyle.overCurrentContext are required anyway. I have a suspicion this is navigation bar related. The presenting UIViewControllers have navbars and the presented UIViewController does not. Any help would be appreciated. class SegueFromLeft: UIStoryboardSegue {     override func perform() {         let src = self.source         let dst = self.destination     // The offset is the starting y for the menu ViewController    var offset:CGFloat = 44.0 // good for iPhone 11         src.view.superview?.insertSubview(dst.view, aboveSubview: src.view)         dst.view.transform = CGAffineTransform(translationX: -src.view.frame.size.width, y: offset)         UIView.animate(withDuration: 0.35,                   delay: 0.0,                   options: .curveEaseInOut,                   animations: {                     dst.view.transform = CGAffineTransform(translationX: 0, y: offset)                     },                         completion: { finished in                         src.present(dst, animated: false, completion: nil)                     }             )     } }
0
0
967
Sep ’20
No simulators with Xcode 11.2.1
I downloaded XCode 11.2.1 from the App store today and I have no simulators. Can I get all the 13.2.2 simulators or do I have to add them one by one? All the simulators had been deleted in the past and I'm assuming that XCode doesn't just install a new set on installation?Thanks in advance,Jon
1
0
619
Nov ’19