c.im is one of the many independent Mastodon servers you can use to participate in the fediverse.
C.IM is a general, mainly English-speaking Mastodon instance.

Server stats:

2.8K
active users

#swiftui

1.5K posts56 participants1 post today

More fun printing MKMapViews…

If I call my method to print the map from a toolbar on the view things work as expected.

If I trigger a call to the same method from a menu command I lose the markers in the print.

You can clearly see the screen redraw when the menu command is selected. I assume the image is generated so quickly that the markers are not redrawn yet .

The toolbar button does not cause a redraw

Sigh.

Обзор Copilot в Xcode на SwiftUI

Вот я и добралась до Copilot (знаю, поздно, всё руки не доходили установить). Было жутко интересно, чем конкретно он мне может помочь в написании кода. Так что, ХаброКотаны, кому интересно, приглашаю вас почитать дальше. P.S. Обложку, кстати, сделал гпт в стиле гибли из моей фоточки.

habr.com/ru/articles/896446/

ХабрОбзор Copilot в Xcode на SwiftUIВот я и добралась до Copilot (знаю, поздно, всё руки не доходили установить). Было жутко интересно, чем конкретно он мне может помочь в написании кода. Так что, ХаброКотаны, кому интересно, приглашаю...
Continued thread

#Xcode #SwiftUI #iosDev #MacOSDev

if my description of the code causing the problem is unclear, here is an example:

Preview {
guard let foo = SomeOptionalThing() else {
return Text(“Oops”)
}

return MyActualView()
.environment(foo)
}

its the branching that's the issue. A ViewBuilder might work around this but you can't use one directly in the Preview.

Worked fine until latest updates. I am in a MacOS app project if that matters

If you have any previews in your #Xcode projects that are using the `return someView{}` syntax the latest update will return an error for this.

The error is that you are not returning a `some SwiftUI.View` type regardless if the view you are returning is in fact a SwiftUI.View.

I've not refactored my code around this yet but if you have this sort of pattern you may want to hold off on updating

Just moved over from mastodon.design, so it's time for another #introduction!

I'm Toni 👋

I’m a software designer, though I’m spending more and more time writing code, mostly in #swiftui and #react

When I'm not heads down at work, you'll catch me #cycling, eating my weight in oranges, walking with my #schnauzer named Xenon, or just getting lost in a new #book, #anime, or #manga.

I’m also a passionate #yugioh collector, #nba fan and I play #guitar occasionally.

🍊toni.li/about

PrintingKit 0.7 is out! 🚀 This is an open-source #Swift & #SwiftUI SDK that lets you print images, texts, attributed strings, PDF, and SwiftUI views directly from your app. This new version simplifies the library and adds support for printing images & views with less work.
github.com/danielsaidi/Printin

PrintingKit is a Swift SDK that helps you print images, strings, views, PDFs etc. in Swift and SwiftUI. - danielsaidi/PrintingKit
GitHubGitHub - danielsaidi/PrintingKit: PrintingKit is a Swift SDK that helps you print images, strings, views, PDFs etc. in Swift and SwiftUI.PrintingKit is a Swift SDK that helps you print images, strings, views, PDFs etc. in Swift and SwiftUI. - danielsaidi/PrintingKit

I spent today creating a version of the SFSymbols app that I think is going to meet my needs better. I am wondering if there would be any interest in an inexpensive #Swift / #SwiftUI course to learn how to do this for iPhone, iPad and Mac. Let me know with a comment!! #iOSDev

Fun times. My macOS app runs fine on Sequoia but not on Ventura (I'd like to support every OS version Apple still supports). I do have "if #available" checking for some newer SwiftUI functionality, but apparently Xcode didn't catch everything?

Guess I need to set up some test VMs.

OnboardingKit is updated with a new icon. This is a #Swift and #SwiftUI SDK for creating onboarding experiences, that I created many years ago. While TipKit is great, and will most probably replace many parts in this library, it comes with predefined onboarding types and also has nice page flows and slideshows.
github.com/danielsaidi/Onboard

OnboardingKit is a Swift SDK that helps you create onboarding experiences in Swift and SwiftUI. - danielsaidi/OnboardingKit
GitHubGitHub - danielsaidi/OnboardingKit: OnboardingKit is a Swift SDK that helps you create onboarding experiences in Swift and SwiftUI.OnboardingKit is a Swift SDK that helps you create onboarding experiences in Swift and SwiftUI. - danielsaidi/OnboardingKit