Alex Lenkei
banner
alexlenkei.bsky.social
Alex Lenkei
@alexlenkei.bsky.social
Learning Swift and SwiftUI to build Informed, a civic and political data app for iOS: @beinformed.app // https://beinformed.app/

Other interests: Reading 📚 | Hiking 🥾 | Traveling ✈️ | Photography 📸 | Nature 🌲 | Politics 🏛️ | Running 🏃 (he/him)
Is anyone familiar with UNUserNotificationCenter & pendingNotificationRequests()? My app has a feature where users can schedule notifications for upcoming elections and it has logic that handles duplicate notification requests by checking the identifier of pending requests before scheduling it. 1/2
November 12, 2025 at 5:13 PM
Implemented a much better filter picker for the election results list 👀 When you select one filter, the available options of the other filters will be reduced to only include those that have elections, so you can't create a combination of filters that leads to no elections.
November 5, 2025 at 2:40 PM
We have animating, live election results :)
November 5, 2025 at 12:25 AM
If you ever want to hide the navigation bar title (but not the entire navigation bar) and still want to have a nav title that is shown when users long press on the back button, you can do that.
November 2, 2025 at 7:24 PM
So the API I use to pull upcoming elections does not distinguish between different House elections in the same state. Of course, to fetch information about a particular district's election (candidates, campaign finance info), I need the user to manually select a district, hence the solution below.
November 2, 2025 at 12:53 AM
I've brought the UI and logic of the Mail app's filter picker to Informed. The advantages of this UI are that you can easily turn the filter "off" while still saving your filter selections and you can easily see what those options are. #SwiftUI
October 30, 2025 at 11:49 PM
Made a few minor adjustments to the sheet/picker style. Full code: gist.github.com/alexl9412/54...
October 30, 2025 at 12:25 PM
And now I've duplicated the filtering logic. Looks pretty good overall! My only annoyance is that when changing the filter option from "All" to another option (or vice versa), the first time the filter button expands/contracts, it animates, but not on subsequent times.
October 29, 2025 at 8:45 PM
I've improved this a little bit. The animation and animation speed don't quite match the one in Mail, but this works for now:
October 29, 2025 at 3:25 PM
Here's the Mail example:
October 29, 2025 at 2:09 PM
Trying to learn the new Liquid Glass and Toolbar APIs by re-creating the filter picker in Mail, but I'm not quite getting the animations/interactions right. Is this a ToolbarItemGroup? A GlassEffectContainer? I haven't seen any other attempts online.
October 29, 2025 at 2:09 PM
That's helpful! It looks like this change effects segmented pickers but not those created with the .searchScopes modifier, indicating that the Music app uses the former. I tried placing the picker with ToolbarItem(placement: .principal) and others, but the picker disappears when search is activated.
October 25, 2025 at 4:09 PM
Here's a better illustration of the problem. I've been trying to update my app's search feature for iOS 26 but can't get the search scopes/segmented picker to match the appearance and behavior of the one in the Music app. Any ideas?
October 25, 2025 at 3:03 PM
Solved it! The second page is now animating as intended, regardless of how you navigate the pages. The solution? LazyHStack -> HStack.
May 10, 2025 at 4:22 PM