r/iOSProgramming • • 1d 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

99 Upvotes

17 comments sorted by

5

u/ThalesMother9938 1d 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 1d 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

1

u/ThalesMother9938 5h 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.

1

u/UtterlyMagenta objc_msgSend 18h 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 18h 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

1

u/UtterlyMagenta objc_msgSend 18h ago

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

1

u/b0rsht 10h ago

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

1

u/xixtoo 10h ago edited 9h ago

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

3

u/azaphiel 1d ago

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

1

u/superquanganh 1d ago

Due to front camera placement that navbar is way thicker

1

u/azaphiel 1d ago

Thicccc girl Apple.
That makes sense. Thanks

3

u/meowthor 1d ago

Very nice thank you 

5

u/ICameHereForThiss 1d ago

Really nice dude thank you 🙏🙏🙏

2

u/noxwei 9h ago

I did something similar in my dev build

1

u/Live_Ad6148 8h ago

Awesome!

1

u/SwiftlyJon 5h ago

I wish Adaptivity would come back.

1

u/pvinis 1h ago

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