Masthash

#SwiftUI

erin sparling (he/him)
14 minutes ago

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?

A screenshot of a set of translucent squares overlayed on a postcard. Each square has a black type specimen on it.
technicat
27 minutes ago

the conversations screen is prettier although not particularly informative #tootsdk #Mastodon #swiftui #fedicat

screenshot of a conversations screen with each conversation depicted by a group of avatars
SENTINELITE
2 hours ago

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)

An image of an iPhone showing a bottom sheet, with padding around all the edges. The image is marked up with some orange arrows & text, helping guide the user’s attention towards the padding along the edge of the presented sheet & the phone’s bezels.
technicat
5 hours ago

beginnings of a conversations screen #tootsdk #Mastodon #swiftui #fedicat

a screenshot of a Conversations screen showing a row of avatars on each row

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.

Sean Heber
9 hours ago

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)
13 hours ago

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

Cihat Gündüz
14 hours ago

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

Evan K. Stone
14 hours ago

Mastering charts in SwiftUI. Pie and Donut charts. | Swift with Majid @Mecid

#SwiftUI #iOSDev

https://swiftwithmajid.com/2023/09/26/mastering-charts-in-swiftui-pie-and-donut-charts/

Ryan Lintott
14 hours ago

I decided to start a line of apparel for my Swift packages. Perhaps they will also be of interest to 80s/90s fitness instructors or DDR professionals?

https://cottonbureau.com/people/ryan-lintott

#iOSDev #SwiftUI #Swift #DDR #Fitness #80s #90s #TShirt #Merch

A black t-shirt with my I Like To Move It logo with DDR up and down arrows in white with pink and purple outlines next to a purple t-shirt with my ShapeUp logo with 90s style triangles and squiggles also in pink and purple.
Dmitry Kudryavtsev
16 hours ago

@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

Gernot
17 hours ago

Has anyone managed to integrate the new #SwiftUI SubscriptionStoreView with an additional One-Time purchase?

Sandro Pennisi
19 hours ago

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. 😒

:rss: Qiita - 人気の記事
21 hours ago
Gavin McKenzie
1 day ago

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.

Michael Steeber
1 day ago

Prototyping some designs. These may or may not ever see the light of day #SwiftUI

Chris Free
1 day ago

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?

#iOSdev

Dean
1 day ago

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/

https://www.avanderlee.com/sendy/w/bKN9VIZhL4M8sjBykpOXjA/1g197sxORSW2Zw6xXxYd0g/c8ubUmaAJ1g6T2xL763ZPmjQ

#Featuring #BlogPost #ShareLink #SwiftUI

Graham
1 day ago

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.

#macdev #SwiftUI #SwiftData

Sean Rucker
1 day ago

🤔 Did you know #SwiftUI has container views called Form and Section? I put them to use in @judoapp to recreate (part of) the Apple Settings app with a working wi-fi selector and Airplane Mode toggle.

#uidesign #uxdesign #iosdev

iPadOS toolbar disappears after transitioning from split view to full screen (FB13206627) #iOSDev #SwiftUI

iPad app in Split View with Safari on right. App is showing detail view with a single item in the toolbar at top right
iPad app shown full screen but missing the detail view toolbar
Marcel
2 days ago

How are these called? It's something other than #SwiftUI's contextMenu modifier.

Lukas Kubanek
2 days ago

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

#SwiftUI #UIKit #iosdev

Slothdude
2 days ago

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.

#swift #swiftUI

Victor Villas
2 days ago

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.

Sandro Pennisi
2 days ago

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

#SwiftUI #IndieDev #SorryForSelfPromoSpam

Luca
2 days ago

On #iOS17, how do you set up an interactive widget that allows running interactions when the screen is locked? (For example standby). I figured static var authenticationPolicy = .alwaysAllowed would do the trick but this still asks for the phone to be unlocked first. #iosdev #swiftui

Sandro Pennisi
2 days ago

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

Jon Duenas
3 days ago

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

Marcel
3 days ago

I don't understand the new #SwiftUI preview macros. How do I do something like this with them?

@mos_8502 A bit of blasphemical, but… #SwiftUI for Linux, that would be awesome. 😃

vandal
3 days ago

Apparently there's not enough users subscribing to apps on the MAS for Apple to care and make their APIs available on macOS 🤬 #swiftui #storekit

Dean
3 days ago

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/

#blog #iOSDev #swiftui #ios

Juan Arzola
3 days ago

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.

SwiftUI code that contrasts the usage of a an if statement in a row with using switch.
Luca
3 days ago

Finally getting to dive into interactive widgets for EasyMQTT! Looking promising already.
#iOSdev #SwiftUI

vandal
3 days ago

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

Graham
4 days ago

It's cold and rainy, so what better time to mess with some #SwiftUI list animations?!

#BuildInPublic

Eric Vitiello
4 days ago

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/

Karl Baron
4 days ago

Glad to see that Apple are also struggling with #SwiftUI
#iosdev

The iOS 17 Lock Screen Play controls but everything is stretched out and aligned oddly
David Bureš
4 days ago

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

Axel Le Pennec
4 days ago

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?

#indiedev #BuildInPublic #iosdev

Axel Le Pennec
5 days ago

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...

#indiedev #buildinpublic #iosdev

Marcel
5 days ago

Thanks, Tim Apple!

#swiftui

Sean Rucker
6 days ago

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.

#swiftui #iosdev

https://medium.com/airbnb-engineering/unlocking-swiftui-at-airbnb-ea58f50cde49

David Bureš
6 days ago

I’m looking for macOS design input:

I’ve been trying to adjust the look of the incompatibility warning, but even this updated version doesn’t feel right.

Does anyone have any design tips on how I can make it better?

#macOS #swiftUI

Axel Le Pennec
6 days ago

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...

#SwiftUI #Xcode #BuildInPublic #iOSDev #indiedev

Konrad Kołakowski
6 days ago

@phill Yep, until SwiftUI will be stable across at least 3 OS releases, it's really hard to use it right now in larger, matura apps 🤔

Indie devs will have problems as well, it's ok to ship a new app with iOS 17 as requirement, but what about few years?

#swiftui

Roman Lefebvre
6 days ago

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? 🤔

Roman Lefebvre
6 days ago

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… 😪

kkla320
6 days ago

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.

Gernot
1 week ago

#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.

Axel Le Pennec
1 week ago

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.

cc @curtclifton @ricketson

Axel Le Pennec
1 week ago

I want to present a "small" sheet on iPad using #SwiftUI like the "What's New in Photos" attached (I think this is a UIModalPresentationStyle.formSheet in #UIKit).

But I've not found a way to have that without having to wrap UIKit...

So is formSheet not available in SwiftUI?

#iOSdev #indiedev #buildinpublic

César Pinto Castillo
1 week ago

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?

#swiftUI

Axel Le Pennec
1 week ago

@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

#iosdev #indiedev #swiftui

Axel Le Pennec
1 week ago

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

cc @curtclifton @lucabernardi @ricketson

David Bureš
1 week ago

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

Axel Le Pennec
1 week ago

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

#indiedev #iosdev #buildinpublic

Rafa
1 week ago

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?

Gernot
1 week ago

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.

Marcel
1 week ago

New and improved Henlo contact import flow.

#buildinpublic #swiftui

technicat
1 week ago

reorged the buttons a bit and got the like+boost button in sync. It’s fun, you’ll like it! #swiftui #Mastodon #tootsdk #fedicat

This photo depicts a screenshot of a boosted and favorited post
stephen ryner jr. 🦉
1 week ago

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/

#SwiftUI

Emilio Peláez
1 week ago

The + button gives you suggestions from a list I generated using a LLM with ~400 items, and if you select an item that has already been added, it just gets unchecked.
#iOS #Swift #SwiftUI

Emilio Peláez
1 week ago

I've struggled to find a grocery list app that has a passable design, doesn't have ads, and doesn't have a $4/mo subscription with tons of features I don't need, so I obviously had to create one myself.
#iOS #Swift #SwiftUI

Deirdre Saoirse Moen
1 week ago

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.

https://swiftui-lab.com/eager-grids/

#SwiftLang

Aaron Bushnell
1 week ago

😅 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! 🎉

Thomas Ricouard
1 week ago

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

David Bureš
1 week ago

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 😅

#swift #swiftui

Sofia
1 week ago

#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! 😍

https://ambre.ambi.se

#SwiftUI #indieDev #recipeApp #iOS17 #womenInTech

Jan Ekholm
2 weeks ago

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?

#swiftui #buggy #argh #backtonavigationview

technicat
2 weeks ago
screenshot of an iOS app showing a Friendica feed with two posts visible, one from the Friendica admin about the wienermobile and another from my Mastodon account
Marcel
2 weeks ago
TelemetryDeck
2 weeks ago

#SeptemberMemberShoutout
The developer with the prettiest profile picture @thatvirtualboy writes about #iOS development and #SwiftUI on his blog.
https://thatvirtualboy.com/

Christian Tietze
2 weeks ago

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.

NSScreencast
2 weeks ago

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!

https://nsscreencast.com/series/61-macos-mastodon-client

Marcel
2 weeks ago

Why would the Link think that the phoneNumber is nil, even though it isn't? I don't get it.

phoneNumbers is literally an optional array of strings.

I'm sure there's an easy explanation for this.

#swift #swiftui

Axel Le Pennec
2 weeks ago

I tried:
- Create a custom type that conforms to Identifiable.
- Create two polylines (inner & outer)
- Use them in the Map builder.

It still does not work. It seems we can't have two MapPolyline for the same coordinates. And I don't know how to change the style of a single one.

#MapKit #SwiftUI #UIKit

Axel Le Pennec
2 weeks ago

When using #MapKit with #SwiftUI, is there a way to have a polyline in a colour with a stroke in another one? Like in Apple Maps (first screenshot).

In #UIKit, I used to add the same polyline twice but with different renderer (width & color). It does not seem to work with #SwiftUI.

#iOS #indiedev #buildinpublic

Ben O'Matic
2 weeks ago

My new app is in review. Also, I threw together a basic web site for it:

https://yourbackburner.app

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!

Chris Wu :toucan:
2 weeks ago

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.

#SwiftUI #accessibility #a11y