#SwiftUI
I built a #swiftui font selector inspired by Letraset’s rub-on letters that I used to love playing with when I was younger. Go figure?


I'm at a loss. I want to create a custom `.sheet` #SwiftUI modifier, that has padding along all the edges, & can have a dynamic height.
I have this working with a`.overlay()` modifier, driven by various things, but it's becoming cumbersome to maintain at scale.
The standard implementation of `.sheet` doesn't do this? I tried digging into some #UIKit, but that didn't go well... (I’ve not used much UIKit in my life)

Seeing a full view width button on iPadOS 17’s update screen reminds me of when I was a #SwiftUI newbie and did similar things.
I used the new #SwiftUI `scrollTargetBehavior(.paging)` API in Wallaroo 1.4 (https://wallaroo.app). It's so much nicer than the hacked up `TabView` and `GeometryReader` stuff I used previously. (Sadly the old one is still used on older OSes because the new API requires iOS 17 / macOS 14.)
There was one thing that threw me off for a couple hours, though: The inner container (`LazyHStack` in our case) absolutely needs to have spacing explicitly set to 0 or else the pages won't land correctly!
![SwiftUI code:
ScrollView(.horizontal) {
LazyHStack(spacing: 0) {
ForEach(content.indices, id: \.self) { idx in
page(content[idx], idx)
.containerRelativeFrame([.horizontal, .vertical])
.clipped()
}
}
.scrollTargetLayout()
}
.scrollPosition(id: $selection)
.scrollTargetBehavior(.paging)](https://assets.toot.cafe/cache/media_attachments/files/111/138/804/721/022/267/small/151b22bd15940eda.png)
My Scoreo update for #iOS17 and macOS #Sonoma is available now! I've got lots more to add for 17, but this new version takes advantage of some nice new features in #SwiftUI to nicely clean up some of the UI. I've also migrated to using Swift Graphs and wow it's so easy to make fantastic graphs now!
https://apple.co/39QcGas




Today I created an AsyncButton in #SwiftUI that automatically creates a Task for you so you can #await calls inside its action.
It automatically shows a progress icon, disables the button while in progress & even indicates success/failure! ✨
Full code:
https://github.com/FlineDev/HandySwiftUI/blob/main/Sources/HandySwiftUI/Views/AsyncButton.swift

Mastering charts in SwiftUI. Pie and Donut charts. | Swift with Majid @Mecid
https://swiftwithmajid.com/2023/09/26/mastering-charts-in-swiftui-pie-and-donut-charts/

@siddhantgoel I tried paperless but I don’t like having a server. So for now, I use the Johnny decimal system. But I really wish there was a proper documents app with sorting, cataloging, tagging and search.
If I knew #swiftui, and didn’t hate building UIs in general, I would build one myself
Has anyone managed to integrate the new #SwiftUI SubscriptionStoreView with an additional One-Time purchase?
I have a love/hate relationship with #SwiftUI. I love the concept and when it works it’s amazing. When it doesn’t work though, then you’re just fucked. Almost no ways for workarounds.
And with every major or even minor release you can be sure that they broke some stuff in new ways. You can just hope it doesn’t touch stuff important to your project.
I thought i worked around on most issues with SwiftUI document based apps. But of course in Sonoma there’s a new one. 😒
【SwiftUI】ScreenTimeAPIで特定のアプリを一定時間全く使用できないよう制限する
https://qiita.com/1-eyeddd/items/57f9644591bb9c9f3365?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
#qiita #iOS #Swift #個人開発 #SwiftUI #ScreenTime
Just spent an entire day cobbling together a solution for determining when a user opens and closes a #SwiftUI Menu so I can hide a floating bar at the bottom of the screen while the menu is open. An entire day and so far I have a mostly workable approach involving layering a simultaneous gesture box over the menu button and inserting a clear overlay over everything while the menu is visible to trap taps outside the menu. Would be much better if there was an out of the box way of doing this.
Prototyping some designs. These may or may not ever see the light of day #SwiftUI

Let's say I wanted to create some MapKit overlays of shapes made up of curves. How would I handle this in #MapKit for a #SwiftUI app? By the looks of things, MapKit support for SwiftUI got a lot better in #iOS 17, but I don't see any documentation related to overlay shapes more complex than polygons.
How would you approach this?
Guess who have been featured by Antoine Van Der Lee’s Newsletter?
Happy to see that my struggles with ShareLink is pleasant enough to be widely shared! 🤩
https://blog.thomasdurand.fr/story/2023-09-24-curious-case-of-sharelink/
I've got a very early build of my software license management app, which I'm calling Serial Box (hehe).
There's still some low-hanging fruit to take care of, therefore, I'm doing a closed beta to get some feedback, mostly on UX stuff right now. If you're interested shoot me a DM and I’ll reply with a TestFlight link when/if it gets approved.
Note that Serial Box does require macOS Sonoma.



I ran into this issue when I tried to use a UISheetPresentationController from SwiftUI to get more flexibility for sheet configuration, which was only available in UIKit. I was so happy to learn that iOS 16.4 brought all the missing features into SwiftUI and I wouldn’t need UIKit anymore!
Didn’t last long, though. It turns out this animation glitch is an underlying issue, present even when using SwiftUI sheet APIs only. Reported as FB13206351.
🔗 https://github.com/structuredpath/AppleBugReports/tree/main/FB13206351

Sigh. I need a Core Image filter that replaces a source colour in an image with a target colour, with some level of tolerance. All the tutorials that I have found online stop just short of that and simply tell me how to apply a sepia tone filter or something. Or even worse, tell me to use template image rendering, which doesn’t cut it here.
It can’t be that difficult, can it? I already have an example that works on the CPU, but I’d like a bit more performance.
Newcomer to #swiftui and #macOS development, it took weeks before I understood why I was seeing so many "<private>" messages on my app console.
On a whim I tried my app with an iPhone simulator and then I realized how much relevant info I was missing out lol
I read many places saying that private logs would show if I had a debugger attached, but it simply isn't the case for my macOS app 🤷 still a mystery to me.
And this was actually made with Kolibri itself. One tap and you have the SwiftUI code for such an animation. It took me maybe 10 mins to make it using SF Symbols and pre-made animations in Kolibri.
https://apps.apple.com/us/app/kolibri-for-swiftui/id6447380792


The iOS 17 keyframe animation stuff is pretty cool and I want to include it in Kolibri as an option. But Kolibri supports iOS 16 too and I want to support it for a while.
So should it be a general option like you can select between generating code for iOS 16 or iOS 17 style? I think yes, but should this be an app wide setting or a per document setting? 🤔 #SwiftUI
Per document sounds cool but maybe it's confusing, like the user sets it for iOS 17 and then in another doc it’s iOS 16 unexpectedly
Cork version 1.2.1 is out.
This update includes a sweet feature which will be super useful for Sonoma: system compatibility checking! Cork now checks if a package you're trying to install is optimized for your macOS version, and will give you a warning if it's not.
In the future, you will also be able to set which macOS version to check.
This update also includes a lot of bugfixes related to navigation.
#swift #swiftUI #macOS #opensource #buildinpublic #macdev #homebrew #CorkApp
Just released a major update to my app, FourSix - an app for making pour over coffee brewing easy. Check it out! https://apps.apple.com/app/id1519905670
Written entirely with #SwiftUI and utilizes SwiftData and Charts. #iOSDev
I don't understand the new #SwiftUI preview macros. How do I do something like this with them?

SwiftUI EnvironmentValues
#SwiftUI #Programming #iOS #macOS
https://onmyway133.com/posts/swiftui-environmentvalues/


I've been working a lot with ShareLink the past few weeks.
And from some inconsistent behaviors, I came up with one blog post, and two radar tracking numbers!
https://blog.thomasdurand.fr/story/2023-09-24-curious-case-of-sharelink/
Fun thing about #SwiftUI list rows: using a switch statement instead of an if / else can completely change how a list treats the row. For example, returning EmptyView() completely hides a row in if/else, whereas it doesn't in a switch statement.


WTH isn't redeemCode available on macOS? #swiftui #storekit
Is the MAS again still that far behind its iOS counterpart?
https://developer.apple.com/documentation/storekit/storebuttonkind/4203110-redeemcode
It's cold and rainy, so what better time to mess with some #SwiftUI list animations?!

In addition to the PhaseAnimator, SwiftUI introduced the KeyframeAnimator in iOS 17, allowing developers to create advanced animations using keyframes. In
#Swift #SwiftUI #Programming #iOS #macOS
https://www.appcoda.com/keyframeanimator/

Huge shoutout to @averyvine who taught me that you can format a String array!! Thanks to him, all lists in Cork 1.3.1 will have properly-localized elements instead of the forced latin commas 😊
BTW if you want Cork for free forever, join the localization team 👀 👀 more info to be found on the Cork Discord: https://discord.gg/kUHg8uGHpG
#swift #swiftUI #macOS #opensource #buildinpublic #macdev #homebrew #CorkApp



I’m seeing a strange animation of my paywall content when it appears (it’s a #SwiftUI NavigationStack presented as a sheet). I don’t really know where this could come from as I don’t call any animation…
Have you experienced that? Is there a fix?

I rebuilt my 10-year-old boating logbook app @AppSkipper from scratch in #SwiftUI & the update is now available for #iOS17 🥳.
➡️ https://apps.apple.com/app/id671764434
It's time to bring it to the next level: widgets, Live Activity, CloudKit sync, watchOS...

Airbnb publicly adopting SwiftUI is huge validation for the framework’s maturity. They’ve been advocates of their own homegrown UI framework Epoxy since 2016 which they deemed necessary to bridge the gaps in UIKit. Transitioning away from Expoxy to SwiftUI sends a clear signal: SwiftUI is mature, viable and the best way to build iOS apps.
https://medium.com/airbnb-engineering/unlocking-swiftui-at-airbnb-ea58f50cde49

Strange random crash when debugging in Xcode. Happens when I present a sheet with a NavigationStack and a List within. I don't really know what's the issue, seems related to an index, maybe for the list items...

To be clear, #SwiftUI has to make UX decisions. It's providing us with complex components after all. But this one seems completely arbitrary. Why should it not behave the same everywhere by default? 🤔
When using the .searchable modifier in #SwiftUI to add a search bar, it looks like the bar is always shown by default if it's on the first screen of your navigation, and hidden by default otherwise. Now, you can tell it to always be shown but you can’t tell it to be hidden by default!
I don't think SwiftUI should make that kind of UX decision, but if it does, it should always allow you to override it. I want my search bar to be hidden by default on my first screen… 😪
Some thing that I really dislike about #SwiftUI is the provided build in integration with #CoreData or #SwiftData. The coupling of persistence and UI is a violation of separation of concerns.
When you want to change your persistence you need to change your UI.
#swiftUI Question: What happened to the .scrollTarget modifier? I have trouble using an HStack with the new Scroll methods, it just does not work. Usind LazyHStack + .scrollTargetLayout() works, but I don't want the LazyHStack since I don’t want it to use the full height.
Apples developer videos have the .scrollTarget modifier, but it seems to not exist anymore. .id or .tag works for scrolling *to* the view, but when scrolling *on* the view, the position id does *not* update.
I filed a feedback for that: #FB13194198 because I think this is missing. presentationDetents were added to #SwiftUI so other presentation modes should also be added for iPad.

Anyone else using #ShareLink on #macOS? We're sharing a file with a custom UTType, but get an empty sheet when trying to share 😭
Maybe we should be using the .fileExporter modifier?

@curtclifton @lucabernardi @ricketson
I've created an even simpler version if you want to check on your side. I just tested on iOS 16.4 and the issue is a little bit different. The title does not resize from large to inline (we don't see the large), it just appears in inline after one second.
https://gist.github.com/alpennec/1d5a9470206b280826e600bcaac9ec4b
Here is a video of the second issue. It seems to work correctly on the first navigation but breaks after...
- Sidebar is a List where the title display mode is set to .inline.
- Detail is a Text where the title display mode is set to .inline.
Filed: #FB13193430 #SwiftUI #iOS17

Something special is coming in Cork 1.3… (and I think @simonemargio is gonna love it)
Of course, you can also check if a package is compatible with a future version…
#swift #swiftUI #macOS #opensource #buildinpublic #macdev #homebrew #CorkApp


I played with NavigationSplitView in #SwiftUI as I want to have a sidebar + detail view in my app and use the same code for iOS & iPadOS.
Faced soooo many issues like:
1. Removed Core Data object still visible in detail
2. Title in detail jumping on iOS (inline display mode)
3. Can’t change the sidebar background selection
Let me know if you have tips! Thanks
I have a #SwiftUI question for you lovely nerds ❤️
A Button can take any View as a label, when you're writing a custom ButtonStyle, and access `configuration.label` — is there any way of knowing if it conforms to Text, or Image for example?

Is there an easy way to add „Haptic Touch“ in #SwiftUI? I don’t mean the „LongPressGestureRecognizer“ + Feedback, I mean something that works *exactly* as Apples Buttons that have a secondary action on long press. They should take the accessibility option to change the touch sensibility into account, and also work in ScrollViews.
And no, I don’t mean „How to Use Menus“. I know that. I don’t want a Menu. I need something custom.
Wanted to check how to embed a link in Text with SwiftUI, and found the answer in @natpanferova’s site. Thank you!
https://nilcoalescing.com/blog/CustomizeTheStyleOfLinksEmbeddedInText/
Didn’t have the details of a #SwiftUI grid exactly right on Friday (exhausting week), so I left it until this morning. Fifteen minutes with the (interactive with code generation!) Eager Grid builder here not only solved that problem, but showed an optimization I’d missed.
😅 Finally crossed an item off the bucket list: Release an iOS app.
It's not much, but this little 3-tab app took a lot of time and work to get out the door!
Powered by #SwiftUI and #SwiftData, Cicolator is out! https://featherhour.com/cicolator/
Cicolator is a calorie-in, calorie-out (CICO) tracker and meal portioning utility.
Available for iOS, iPadOS, and macOS! 🎉
I wrote an article about migrating Ice Cubes on the new #SwiftUI Observation framework. It was simpler than what I thought it would be, and the performance improvements are well worth it.
https://dimillian.medium.com/migrating-ice-cubes-to-the-swiftui-observation-framework-821f90deebee
I’ve been trying to learn about the MVVM model in Swift/SwiftUI and there’s one thing I don’t get, so please help:
Doesn’t injecting a massive view model everywhere it’s needed lead to performance problems? It doesn’t seem intuitive to me, but I know I’m not getting something about it 😅
#Ambre for #watchOS10 has a beautiful new way to present your recipes. Following a recipe from your wrist is now easier than ever!
Just finished our marketing video, be the first one to see it! 😍
I thought now could be a good time to usr NavigationStack in my SwiftUI app as it anyway requires iOS 16. Turns out the API is still pretty buggy and does not work at all when trying to use navigationDestination(for:) and a NavigationPath. Nothing is ever triggered when pushing stuff onto the path.
Seems Apple's folks all the time break API:s that apparently used to work. Don't they have any automated testing there to detect these bugs?
#SeptemberMemberShoutout
The developer with the prettiest profile picture @thatvirtualboy writes about #iOS development and #SwiftUI on his blog.
https://thatvirtualboy.com/
The bad awakening in #SwiftUI StateObject trickery:
init(foo: Foo) {
_foo = .init(wrappedValue: foo)
}
If this view is in a ViewBuilder that tries to update a lot, the Foo created on the outside will be initialized and then discarded immediately after.
Building a SwiftUI Mastodon Client with macOS
The 17 part series is complete! This was was such fun to make, and I want to thank @_inside for joining me! 💜
This series covers using #SwiftUI and #AppKit together to build a "real” app. It includes networking, JSON parsing, windowing, SwiftUI lifecycle, integration with NSViewRepresentable, keyboard shortcuts and much more!

My new app is in review. Also, I threw together a basic web site for it:
It's iOS 17 specific, as it uses #SwiftData. It's all in #SwiftUI, and uses the #StoreKit for SwiftUI APIs to make for a simple, seamless subscription setup.
The core functionality is pretty full in free mode, but to unlock everything (including all future features, which'll be subscription only) t’s just...
$0.29 / month
$2.90 / year
$29.00 / year for superfans
Hopefully it clears app review!
I installed iOS 17 on my iPhone this morning and VoiceOver testing did not go well.
For a SwiftUI LabeledContent the value is being spoken twice and the Label isn't spoken at all.
If they're tracking today I have an iOS 17 RuleMark on the chart that shows "now" for the current hour. When swiping right to move amongst elements VoiceOver gets "stuck" on this RuleMark and won't progress with swiping right.