Profile picture
, 11 tweets, 4 min read Read on Twitter
Gonna post some of the details from the blog here because hacker news took me offline
Here's the two basic ways you interact. Tapping or dragging
You can move from a tap interaction to a drag interaction by swiping on the menu after its open, there's some hidden details here re. scrolling menus
Unlike popover controllers, the menus dismiss immediately on any interaction with the underlying views (scrolling the editor in this case). Makes them feel more lightweight
I got this idea from @procreate — they do the same thing with their custom popovers. You can start drawing on the canvas right after choosing a colour, no need to tap-to-dismiss the popover
I needed to support long menus (and small screens). It uses a scroll view when the content exceeds a max height

Then you can either tap-and-scroll through the menu, or use a single drag gesture and pull towards the edge to scroll to the item and select it
Then there are a bunch of details that come out of using these menus in a real app. In the next major Codea update we switch between real tab bars and compact menus as you resize

But the tab bars impact the readability of the menu at times
So we compute amount of area covered by the menu item over its underlying views, and decide whether to use a light or dark tint dynamically

(No, UIVibrancyEffect doesn't do this and results in less readable menus)
On displaying the shortcuts: doing it naively — just rendering text on the right side — leads to fairly uneven characters. macOS has a complex column-based shortcut key layout. I recreated this with a UIStackView here
The other neat thing is you can incorporate standard gesture-based shortcuts right in the menu. It'd be good to have these functions explicit in the Edit menu, too, but it's nice to have
Finally, you can also use the iOS drag-and-drop API to re-order menu items (where it makes sense). And even do tricky things like this

This clip shows exporting a Lua file out into the file system, then importing a plain text file right into your code as a tab
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Simeon
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!