Posts

Post not yet marked as solved
7 Replies
1.5k Views
SwiftData #Predicate performs $0.string1 == string2 as case sensitive. Searching for Taylor Swift returns results, but not for taylor swift. In Core Data we did this with ==[c] How do we do this in SwiftData?
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.4k Views
I was hoping that the options under the More button in a SwiftUI TabView app would be fixed in Xcode 11 GM. Unfortunately it still does not work!Tapping a More button option shows nothing under portrait device orientation. However, in landscape orientation when all my 7 tab bar items are visible the More options show their views.Other views in landscape orientation do not show until I swipe right to reveal it. Selecting an option does not completely show the view on right hand side.The default ContentView auto generated for a Tabbed App still shows the old code with selection @State var tags. No need for those any more. No need for VStack since it is the default. Why wasn't it updated to reflect the clean code in Xcode 11 GM?It seems to me that the Tabbed App is still work-in-progress. Why? It used to work very well under the UIKit! Tabbed apps are very commonly used and I am shocked that it does not work!
Posted Last updated
.
Post not yet marked as solved
5 Replies
3.6k Views
struct ContentView: View { @State var someText = "Change me!" @State var someNumber = 123.0 var body: some View { Form { // The entire View is re-rendered after each character is typed TextField("Text", text: $someText, onEditingChanged: { edit in print("onEditingChanged executed!") }, onCommit: { print("onCommit executed!") } ) // When you enter a Double value, the View is not re-rendered until you hit Return TextField("Number", value: $someNumber, formatter: NumberFormatter()) Spacer() Text("text: \(self.someText), number: \(self.someNumber)") } }}
Posted Last updated
.