Post

Replies

Boosts

Views

Activity

Reply to UIKit mapView color annotations
@DTS Engineer I've played a bit with the sample code project for annotations and I do NOT get colors or image rotation as you suggested. Please advise. The code I am using is: let image = imageLiteral(resourceName: "flag") // original L159 of MapViewController // my example image code let configuration = UIImage.SymbolConfiguration(pointSize: 20, weight: .regular, scale: .default) let image2 = UIImage(systemName: "flag", withConfiguration: configuration)?.withTintColor(.green) let flippedImage = image2?.withHorizontallyFlippedOrientation() flagAnnotationView.image = image2 // or flippedImage
Apr ’25
Reply to Changing minimum deployment to iOS 17.0 Xcode compiler issues
@darkpaw The point I tried to make was there appears to be a functional limit now as to how many .onChange calls you can have in a file that did not exist with the deprecated call. I can make ANY 9 of 13 updated .onChange calls work, just not all 13 at once. The code changes themselves are trivially simple: iOS 16: .onChange(of: modeSelection) { newValue in workout.modeSelection = newValue settingsModified = true } iOS 17: .onChange(of: modeSelection) { workout.modeSelection = modeSelection settingsModified = true }
Topic: UI Frameworks SubTopic: SwiftUI
Mar ’25
Reply to UIKit mapView color annotations
@DTS Engineer I've played a bit with the sample code project for annotations and I do NOT get colors or image rotation as you suggested. Please advise. The code I am using is: let image = imageLiteral(resourceName: "flag") // original L159 of MapViewController // my example image code let configuration = UIImage.SymbolConfiguration(pointSize: 20, weight: .regular, scale: .default) let image2 = UIImage(systemName: "flag", withConfiguration: configuration)?.withTintColor(.green) let flippedImage = image2?.withHorizontallyFlippedOrientation() flagAnnotationView.image = image2 // or flippedImage
Replies
Boosts
Views
Activity
Apr ’25
Reply to UIKit mapView color annotations
Thank you Ed. I have filed a bug as you suggested. MKAnnotationView loses symbol configuration during rendering - FB16957449
Replies
Boosts
Views
Activity
Mar ’25
Reply to Changing minimum deployment to iOS 17.0 Xcode compiler issues
It appears that the limitation is at the view builder/container level. Adding another ZStack at the top level and splitting the .onChange calls fixes/addresses the error. Thank you to my son who suggested the fix. var body: some View { ZStack { ZStack { // View code } .onChange() // 1 ... .onChange() // 9 } .onChange() // 10 ... .onChange() // 14 }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Mar ’25
Reply to Changing minimum deployment to iOS 17.0 Xcode compiler issues
@darkpaw The point I tried to make was there appears to be a functional limit now as to how many .onChange calls you can have in a file that did not exist with the deprecated call. I can make ANY 9 of 13 updated .onChange calls work, just not all 13 at once. The code changes themselves are trivially simple: iOS 16: .onChange(of: modeSelection) { newValue in workout.modeSelection = newValue settingsModified = true } iOS 17: .onChange(of: modeSelection) { workout.modeSelection = modeSelection settingsModified = true }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Mar ’25
Reply to How can I read and display workout data similar to Apple Fitness?
muscleStrength should be an array of HKWorkout. Since it appears to remain initialized, I suggest adding a print("workouts: (String(describing: workouts))") above DispatchQueue.main.async to see what your HKSampleQuery is actually returning.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23