Auto-layout, segues...and test my math education app on Test Flight

Hi Coders,

I’ve been working on an app for a bit, and I have my prototype on Test Flight. It’s a math learning community app for learners ages 4-7. Thanks to Coding with Chris and everyone in the Community for all of the leaning opportunities! Here’s a link if you would like to check it out:

A bit of background: although I have 3 other apps on the App Store, I usually am just winging it as far as development goes. I am an educator, so all my apps are either made for my students or with my students. I am always trying to make learning better for my students, and I am learning app dev as I go along.

Now for my ask(s):

I have no idea how to ensure my app looks good on all devices. Is this an auto-layout thing? And how do I use it? For example, my app looks great on the larger iPhones, not so great on smalls. How can I do this?!

When I connect a segue (no matter what type: detail, show detail, modal), it is not a full-screen popover on iPad. I need a full screen or the draggable sprites won’t work correctly. When I change the segue presentation or transition to ‘full screen’ or ‘over full screen’, I have no way to dismiss the view controller (swipe down in popovers). I am using UIKit and SpriteKit, so views are a mixture of UIKit view controller, game scenes, and an AR scene.

I am pretty sure both of these are foundational knowledge, but I can’t seem to figure out what to do. Can anyone take a look at my app and advise? Even if someone could point me in the direction I need to be going (i.e., if it’s located somewhere in the foundations courses), that may help me with these auto-layout and segue issues. Thank you!

Also, very grateful for feedback regarding my app.

Sincerely,
Karrin Burns

about the pop-over i think its an ios 13 thing

what I did to solve this was to embed my app in a navigation controller so it will be sure to open up a new full screen detail after a segue

Hey, I figured this out with help from the engineers at app dev lab at WWDC21. In order to create a full screen segue with a dismissible view controller in your game scene, you need to add a button sprite to your game scene, then add this programmatically:

  1. Declare a view controller in the scene:

  2. Then create a return function in game scene where you dismiss the view controller:

  3. Call the return function in touchesBegan()

  4. Add the view controller just before scene is presented in the game scene’s view controller:

Additionally, you need to change the segue type to modal, and presentation type to full screen.

After implementing this, my app presents game scenes as a full-cover pop-over (rather than a partial cover pop-over), which allows users to uses my draggable shapes without dismissing the view controller.

Thanks for responding, and I hope this helps others, too.

Hi Francis, thanks for the reply. I tried a navigation controller, but that won’t work properly. See below for my explanation of how this can be done.

Oh wait i didnt realised this was for a game though it was just a normal app… Thanks for sharing though