1

I have a UIViewController with a next button that appears after a click on another UI element.

enter image description here This works perfect on any iPhone above iPhone5S. The next button has a constraint with a value of 20 from the bottom. On top of the View, I added a SKView using this code :

        // Create frame for SKView
        let bounds = UIScreen.main.bounds
        let SKheight = (bounds.size.height) - 200
        let frame = CGRect(x: 0, y: 140, width: bounds.size.width, height: SKheight)
        skView = SKView(frame: frame)
        view.addSubview(skView)

        // Create BubbleScene and place it on SKView
        floatingCollectionScene = BubblesScene(size: frame.size)
        skView.presentScene(floatingCollectionScene)

The SKHeight is the height of the screen of the device used minus 200. This because I want to start it at a height of 140(so that the text on top of the VC is still visible). Normally this would give me a whitespace of 60px heigh at the bottom. This works fine on the iPhone 7 / Plus but on smaller versions like the iPhone 5 I don't see the next button. I guess that the skView is overlapping it somehow..?

Any ideas? Thanks!!

Mathias Verhoeven
  • 927
  • 2
  • 10
  • 24

0 Answers0