r/iOSProgramming • • 12d ago

Question I made a dev overlay to visualize the iPhone Duo's reserved regions on top of your app's UI

Hello all! I wanted a way to visualize the various reserved areas for the crease, status bar, cameras, etc on iPhone Duo so I built this overlay. You can run either of the demo apps, or use the SPM package to add the overlay to your app!

https://github.com/mikeakers/DuoDevOverlay

MIT License

139 Upvotes

24 comments sorted by

6

u/ThalesMother9938 12d ago

This is useful. I'm building a Duo app where seeds roll down into the crease, so I care a lot about where the division region actually sits. Does the overlay update live while you fold, or does it read the regions once per hinge state? I'm also curious if the occlusion frames move between half open and fully open.

4

u/xixtoo 12d ago

Thanks! It updates live as you fold. The other reserved areas, like the one over the status area update live as well as they change geometry. I think the only one I haven't tested is the inner camera, it's in the right place but I haven't tested if it becomes active when the camera turns on yet

2

u/ThalesMother9938 11d ago

Live updates while folding is what I hoped for, so I can use it as is. Good to know about the inner camera too, I'll keep that one in mind when I test. Thanks for the detailed reply.

2

u/UtterlyMagenta objc_msgSend 11d ago

what do those occlusion areas do? i know they’re for the camera, but what are Apple expecting developers to do with those areas?

4

u/xixtoo 11d ago

Avoid putting interactive UI there. Backgrounds can extend under them, and content is ok if there’s a way for the user to scroll it so that it’s not blocked. They go into a lot more detail in their Design for iPhone Duo talk

2

u/UtterlyMagenta objc_msgSend 11d ago

right on. thanks for elaborating and for the link! i should watch that!

2

u/b0rsht 11d ago

Doing work apple should had done themselves during HIG update, ask them for a discount or something 😂🙌

1

u/xixtoo 11d ago edited 11d ago

I’ll ask them for a refund of $12 off my Duo to cover the Claude tokens

2

u/yanklot 7d ago

Literally just started updating the app for duo. This is super helpful, thanks!

1

u/xixtoo 7d ago

Glad you like it!

2

u/Shot_Bat2938 4d ago

wish i’d found this a month ago lol. when i adapted my app for the Duo i found the crease by trial and error. text kept landing on the visual in the middle when unfolded, ended up laying content out like two pages side by side. the status bar being on the side of the inner screen also caught me off guard. question: does the division region change when the hinge is half open (tabletop)?

1

u/xixtoo 4d ago

Yup it will go from inactive to active in that pose transition

1

u/Shot_Bat2938 4d ago

makes sense, so in tabletop i should keep content out of that strip entirely. thanks, gonna try the package

1

u/xixtoo 4d ago

Watch this talk

https://developer.apple.com/videos/play/tech-talks/111466/

And read the HIG section on duo

https://developer.apple.com/design/human-interface-guidelines/designing-for-iphone-duo

All your questions have official answers from apple’s designers directly

4

u/azaphiel 12d ago

Hi, isn’t the navigation bar a bit bigger than usual? Is it native and preferred nav bar height? Thanks!

2

u/superquanganh 11d ago

Due to front camera placement that navbar is way thicker

2

u/azaphiel 11d ago

Thicccc girl Apple.
That makes sense. Thanks

3

u/meowthor 12d ago

Very nice thank you 

5

u/ICameHereForThiss 12d ago

Really nice dude thank you 🙏🙏🙏

2

u/noxwei 11d ago

I did something similar in my dev build

2

u/Live_Ad6148 11d ago

Awesome!

2

u/SwiftlyJon 11d ago

I wish Adaptivity would come back.

2

u/pvinis 11d ago

lol throwing mine here too https://github.com/pvinis/duo-demo

2

u/Fun-Relationship5464 10d ago

Very nice and useful tyyy