Are there any news? Could they help you?
Post
Replies
Boosts
Views
Activity
I did this collapsable picker with two values a while ago.
[https://github.com/AlmightyBeaver/MultiPicker)
And not to be forgotten when one of the apple engineers reads this: Thanks for all the hard work you've over the past year!
I have the same problem, but just on iPhone.
Will it be possible to add an own toolbar, custom buttons or similar above the keyboard?
Will it be possible to automatically shrink the current view when an keyboard enters the display (like in a VStack).
I really wish be could do more with the keyboard, since it is an essential element of the user experience.
Unfortunately it does look like, they won't do it.
https://developer.apple.com/forums/thread/650112
I found this article very helpful. It states also when not use StateObject.
donnywals.com/whats-the-difference-between-stateobject-and-observedobject/
@Mcorey - Done! (FB7784089)
Hopefully a lot of people are doing this too. I found so many threads for this.
https://developer.apple.com/forums/thread/650426
https://developer.apple.com/forums/thread/650076
https://developer.apple.com/forums/thread/649066
https://developer.apple.com/forums/thread/650844
https://developer.apple.com/forums/thread/120763
https://developer.apple.com/forums/thread/129714
and more…
I've also filed a feedback. Hopefully a lot of people are doing this too.
I don't know why they didn't add it this year. From my point of view, this was the first essential missing thing I came across in SwiftUI.
I also had the same question. Would be great if they add it to SwiftUI for iOS.
https://developer.apple.com/forums/thread/650664
Same here
I would also love to see a native solution.
I did one on my own. Maybe you can use it too.
https://github.com/AlmightyBeaver/MultiPicker
It's not really a picker, but you could do this:
struct IngredientsPickerView: View {
		@State var ingredients: [Ingredient] = [Ingredient(name: "Salt"),
																						Ingredient(name: "Pepper"),
																						Ingredient(name: "Chili"),
																						Ingredient(name: "Milk")]
		
		var body: some View{
				List{
						ForEach(0..<ingredients.count){ index in
								HStack {
										Button(action: {
												ingredients[index].isSelected = ingredients[index].isSelected ? false : true
										}) {
												HStack{
														if ingredients[index].isSelected {
																Image(systemName: "checkmark.circle.fill")
																		.foregroundColor(.green)
																		.animation(.easeIn)
														} else {
																Image(systemName: "circle")
																		.foregroundColor(.primary)
																		.animation(.easeOut)
														}
														Text(ingredients[index].name)
												}
										}.buttonStyle(BorderlessButtonStyle())
								}
						}
				}
		}
}
struct Ingredient{
		var id = UUID()
		var name: String
		var isSelected: Bool = false
}
You can use this approach https://developer.apple.com/forums/thread/650876
and then use the NSPersistentCloudKitContainer instead of NSPersistentContainer.
A good explanation of how to integrate the NSPersistentCloudKitContainer properly is here:
andrewcbancroft.com/blog/ios-development/data-persistence/getting-started-with-nspersistentcloudkitcontainer/
Unfortunately it does look like, they won't do it.
https://developer.apple.com/forums/thread/650263
But please fill in a feedback. The more people the better. Maybe they will add it in the beta phase.