nrw.social ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Wir sind eine freundliche Mastodon Instanz aus Nordrhein-Westfalen. Ob NRW'ler oder NRW-Sympathifanten, jeder ist hier willkommen.

Serverstatistik:

2,8 Tsd.
aktive Profile

#swiftui

45 Beiträge21 Beteiligte0 Beiträge heute

Question about SwiftUI: a while ago I read somewhere about an API that allows to adjust the kerning as to avoid making the text “shift” when it changes.

Case in point: a text representing a counter that shifts ever so slightly due to the characters in the font not being mono spaced.

Do you know by any chance what API I’m referring to?

I am in need of some SwiftUI help.

Can anyone help me figure out how to make the `List` span the entire width of the sheet, but, at the same time, make it so that an extremely long, unbroken word doesn't cause it to overflow the sheet?

I have tried all sorts of frames, but nothing works

The relevant code:
github.com/buresdv/Cork/blob/8

Starting with iOS 17, foregroundStyle(_:) in #SwiftUI can be used to style fragments of text inside a string. When applied directly to a Text instance, the modifier returns a Text instead of some View, which allows us to use it inside text interpolation: nilcoalescing.com/blog/Foregro

Nil CoalescingInterpolate text with custom foreground style in SwiftUIAdd custom foreground styles, such as gradients, to words inside Text views in SwiftUI.

A ViewModel is a very specific concept. If you think you need a ViewModel in #SwiftUI (probably not necessary because SwiftUI has formatters like AppKit), I'm pretty sure it should be a struct (representing the projection of the actual model to the values required by the View).
Not, ever, a StateObject.

If any Boston-area #CircuitPython friends would like to come out to Boston College Arts Fest, Sat. April 26, my students are presenting 1-3pm both Physical Computing & #SwiftUI projects in the new MakerSpace building 245 Beacon St. Room 301. No pressure, but would love to see you there if interested & able! @blitzcitydiy @ecken @danhalbert. All welcome! bc.edu/content/bc-web/sites/bc

Boston CollegeArts Festival 2025Boston College's annual celebration of the arts takes place April 24–26
Antwortete im Thread

Finally got everything I need into the pricing table, and started reading up on the web hook docs. Tomorrow let's set up routes for the web hooks, figure out the command-line tool, and verify events. See you then!

🔜 Tomorrow’s stream: youtube.com/live/dJzoMKthGjM
⏮️ Playlist so far: youtube.com/playlist?list=PLRx
📲 Download Jiiiii: apps.apple.com/app/apple-store

youtube.comBevor Sie zu YouTube weitergehen
#Jiiiii#DevStream#tvOS
Antwortete im Thread

Started doing what I set out to do, then got distracted fixing how I handle gift memberships 😅 Tomorrow let’s continue getting customer information into the pricing table. See you then!

🔜 Tomorrow’s stream: youtube.com/live/XZx3e3YAQ4I
⏮️ Playlist so far: youtube.com/playlist?list=PLRx
📲 Download Jiiiii: apps.apple.com/app/apple-store

youtube.comBevor Sie zu YouTube weitergehen
#Jiiiii#DevStream#tvOS

A simple thing that I do all the time in SwiftUI: apply a .border(.red, width: 1.0) to views to make sure the layout meets my expectations. If there are several views, I use different colors. Sometimes, this reveals interesting situations.