I'm seeing this a lot and I'm not running XCode at the moment, so it's not related.
Post not yet marked as solved
Have you tried making test a String whose value you set to "123" in Button1 and "321" in Button2 ?
Post not yet marked as solved
Does this help? https://stackoverflow.com/questions/56784722/swiftui-send-emailI'd be interested in your code once you figure it out.
Post not yet marked as solved
var body: some View {
TabbedView {
SomeView().tabItem {
Image(systemName: "house")
Text("View 1")
}.tag(0)
AnoterView().tabItem {
Image(systemName: "dog")
Text("View 2")
}.tag(1)
}
}where SomeView and AnotherView have a list in their body.
It turns out the solution was fairly simple:catch the willSet messageset the cache to nil (i.e. defer update to when the view will be refreshed)send the willChange messagethe views A and B will be updated and this will repopulate the cache
Post not yet marked as solved
@fkdev, example code would be great indeed!
Post not yet marked as solved
I have just submitted a bug report with an attached project.
Post not yet marked as solved
// Why do you addText("none").tag(0)To be able to also select no player at all. Once you have selected an element, SegmentedControl no longer allows to unselect that element AFAIK. (Nor does it allow multi-element selection BTW, like UIKit previously.)// You should add () at the endYes of course, thanks!
Thanks @sammyjojo, this saved my life! This sould be the accepted answer.
Post not yet marked as solved
Digging further, it is the willChange.send(self) message for this particular view that causes the app to crash in another thread. I have other views that also send the willChange message without any crash.
This no longer seems necessary, as of beta 4. The tutorial only uses it once, in SceneDelagate.swift. And also in previews, but nowhere else.
I've seen the compiler eat up to 400% CPU (swift and SourceKitService processes). This often comes from complex views or incorrect use of things like @Binding, things often difficult to detect. A limitation has been introduced in Beta 3 where XCode will shut itself down if compilation takes too long. I guess this will be iron out progressively.In the meantime, it's best to break down views into smaller pieces and statement progressively and run build often.
I have since found this answer to be helpfull. I've gone for the solution in the 2nd answer.https://stackoverflow.com/questions/56784722/swiftui-send-email
And there is a 3rd issue by the way: 3. Use of unresolved identifier 'present'
Post not yet marked as solved
Slider seems broken in Beta 3. No longer increment by Stride. In the following example, incrementing by 0.1 instead of 0.5```Slider(value: $game.score, from: 0.0, through: game.maxScore, by: 0.5)```