shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

288
active users

#swiftui

19 posts16 participants0 posts today
Tito Ciuro<p>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. </p><p><a href="https://mstdn.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a></p>
Miguel Arroz<p>Wait, .padding() on macOS uses iOS default spacing (16pt) instead of macOS default (20pt)?! Is this that bad? Tell me I'm doing something dumb. It can't be that bad. <a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://mastodon.social/tags/MacDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>MacDev</span></a></p>
Miguel Arroz<p>macOS: Applying vertical .fixedSize to Text adds huge margins above and below for no apparent reason</p><p>Apple folks: FB17238588</p><p>Is there any other way that actually works of avoiding cropping text in SwiftUI on macOS? .lineLimit(nil) is not included in the "actually works" bag of solutions. The only way I can fix this is wrapping everything in a ScrollView but that is obviously not ideal.</p><p><a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://mastodon.social/tags/MacDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>MacDev</span></a></p>
Miguel Arroz<p>Looks like .scrollBounceBehavior(.basedOnSize) is broken on macOS. Even if the content does not fit the visible area of the scroll view, it does not bounce when scrolled.</p><p>Apple folks: FB17238467</p><p><a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://mastodon.social/tags/MacDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>MacDev</span></a></p>
sam henri gold<p>i made a list of things it does with <a href="https://hachyderm.io/tags/Swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Swift</span></a> and <a href="https://hachyderm.io/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> that drives me nuts<br><a href="https://hachyderm.io/@samhenrigold/114339520282017546" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">hachyderm.io/@samhenrigold/114</span><span class="invisible">339520282017546</span></a></p>
robb<p>When animating a count in <a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a>, use `monospacedDigits()` so the frame doesn’t change as frequently –&nbsp;however, that can leave leading 1s look disconnected so I'm skipping it for the first digit while keeping formatting intact <a href="https://gist.github.com/robb/f8fdcca31f82b5f6e7cf2711618eec86" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">gist.github.com/robb/f8fdcca31</span><span class="invisible">f82b5f6e7cf2711618eec86</span></a></p>
Cameron<p>Inspired by an episode of <a href="https://mastodonapp.uk/tags/atpfm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>atpfm</span></a> last year, would love feedback on my latest app, SleepTag. It imports your sleep data and lets you tag it with activities/information to help you better understand what affects your sleep. 100% <a href="https://mastodonapp.uk/tags/swiftui" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>swiftui</span></a> and a lot of Swift Charts!</p><p><a href="https://mastodonapp.uk/tags/iosdev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iosdev</span></a> <a href="https://mastodonapp.uk/tags/indiedev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>indiedev</span></a> <a href="https://mastodonapp.uk/tags/apple" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>apple</span></a> <a href="https://mastodonapp.uk/tags/sleep" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>sleep</span></a> <a href="https://mastodonapp.uk/tags/health" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>health</span></a> <a href="https://mastodonapp.uk/tags/applewatch" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>applewatch</span></a> <a href="https://mastodonapp.uk/tags/swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>swift</span></a></p><p><a href="https://apps.apple.com/gb/app/sleeptag-analyze-your-sleep/id6742378928" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">apps.apple.com/gb/app/sleeptag</span><span class="invisible">-analyze-your-sleep/id6742378928</span></a></p>
Mike D<p>I just launched ShipKit, a new package tracking app for iOS!</p><p>ShipKit makes it easy for you to track your shipments from all of the major carriers worldwide. You can simply enter the tracking info manually or auto-import them by forwarding your shipment detail e-mails to ShipKit to add them automatically!</p><p>Try it free for 1 week now on iOS! Now available on the Apple App Store!</p><p><a href="https://apple.co/42uOLop" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">apple.co/42uOLop</span><span class="invisible"></span></a> <a href="https://masto.ai/tags/swiftui" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>swiftui</span></a> <a href="https://masto.ai/tags/iosdev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iosdev</span></a> <a href="https://masto.ai/tags/indiedev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>indiedev</span></a> <a href="https://masto.ai/tags/iOS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOS</span></a></p>
gallaugher<p>Second <a href="https://mastodon.world/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> mid-term is in progress. Students have 2.5 hrs to build two apps: SwiftData “ESSI - the Emotional Support Snack Inventory app” and “D&amp;D Monsters” a URLSession API call JSON parsing app. Want talent? Send me your job calls and I’ll pass on to them. Even better! All are welcome to the Student Tech Showcase, Sat April 26, 1-3pm, Boston College bldg 245 Beacon St room 301. Hope to see you there! (1/2)</p>
robb<p>If you're trying to like, *really* center Text in <a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a>, use a TextRenderer to disable subpixel quantization:</p>
Aleksander Stojanowski<p>I struggled a bit with performance - <a href="https://iosdev.space/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> doesn’t like a lot of gradients and transparency effects, especially with a few dozen Text views constantly moving inside ScrollView. 😆 I ended up with text just in black/white, it looks the same and works smoothly.<br><a href="https://iosdev.space/tags/IndieHacker" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>IndieHacker</span></a> <a href="https://iosdev.space/tags/IndieDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>IndieDev</span></a></p>
Juan Arzola<p>When working on a combined iPhone/iPad app I found it to be nice to have all `ToolbarContent` structs declared in a single Toolbars.swift file, since toolbar items need to move around ToolbarItemGroups based on SplitView state, and it's easier to see all logic when consolidated in 1 place. <a href="https://sfba.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a></p>
robb<p><a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a>'s Color.mix(with:by:in:) makes it easy to increasingly interpolate the current foreground color towards white (or black) while keeping its hue reasonably intact.</p>
robb<p>I'm working on a <a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> view modifier that calculates a foreground Color that maintains sufficient contrast with the background and also takes the font into account. This can improve <a href="https://mastodon.social/tags/accessibility" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>accessibility</span></a> without too much design-time overhead.</p><p>It's using APCA by <span class="h-card" translate="no"><a href="https://techhub.social/@Myndex" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>Myndex</span></a></span>.</p>
Natalia Panferova<p>We can set a custom background for a window on macOS in <a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> using the containerBackground() modifier. And to extend it to the toolbar, we need to apply toolbarBackgroundVisibility(.hidden, for: .windowToolbar) to the window’s content.</p><p>Learn more: <a href="https://nilcoalescing.com/blog/CustomizingMacOSWindowBackgroundInSwiftUI/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">nilcoalescing.com/blog/Customi</span><span class="invisible">zingMacOSWindowBackgroundInSwiftUI/</span></a></p>
Rasmus Grouleff (he/him)<p>Heeeelp!</p><p>What does the following error mean, and how do I fix it? It happens, when I call `modelContext.save()` in a SwiftUI view.</p><p>"SwiftData/ModelCoders.swift:105: Fatal error: Composite Coder only supports Keyed Container”</p><p>Edit: Solved! It appears SwiftData does not support Duration properties in models. Changing it to a TimeInterval instead fixes it.</p><p><a href="https://mstdn.social/tags/Swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Swift</span></a> <a href="https://mstdn.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://mstdn.social/tags/SwiftData" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftData</span></a></p>
Keith Harrison :clubtwit:<p>My notes on the (to me) surprising scope of SwiftUI keyboard shortcuts <a href="https://twit.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://twit.social/tags/iOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>iOSDev</span></a> <a href="https://useyourloaf.com/blog/swiftui-keyboard-shortcut-scope/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">useyourloaf.com/blog/swiftui-k</span><span class="invisible">eyboard-shortcut-scope/</span></a></p>
J. Blake<p>Today in TIL...</p><p>I have been struggling with understanding how to import whatever might be on the clipboard and this bit of code helped immensely. </p><p>If you copy an image in Safari via the context menu, there are actually nearly 20 different objects placed on the clipboard.</p><p>If this is documented anywhere, I never found it.</p><p><a href="https://mastodon.social/tags/swiftui" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>swiftui</span></a></p>
Natalia Panferova<p>SwiftUI supports several scene types on macOS, and they each serve a different role, from managing multiple windows to adding menu bar functionality. I have a post that covers them all, and I often find myself referring back to it for a quick reference: <a href="https://nilcoalescing.com/blog/ScenesTypesInASwiftUIMacApp/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">nilcoalescing.com/blog/ScenesT</span><span class="invisible">ypesInASwiftUIMacApp/</span></a> <br><a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a> <a href="https://mastodon.social/tags/macOSDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>macOSDev</span></a></p>
Mark Moeykens<p>❓In <a href="https://mastodon.social/tags/SwiftUI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SwiftUI</span></a>, which do you prefer?</p>