Search results for

swiftui

16,623 results found

Post

Replies

Boosts

Views

Activity

Reply to Build is failing on, Xcode 11 beta 5, works fine on earlier beta's
Same thing here. Can't find anything on Google on how to reinstall the plug-in 🙁EDIT:The release notes of Catalina Beta 4 imply that there are problems with Xcode Beta 5:There are known incompatibilities when using SwiftUI in Xcode 11 beta 5 on macOS Catalina beta 4. Update to macOS Catalina beta 5 when it becomes available.I assume the canvas bug will be fixed with the Catalina Beta 5 patch. 👍
Jul ’19
Reply to NSManagedObject Better Integrated w/ Beta 5
This is awesome…thanks for the code snippet!My guess is with a SwiftUI List, this is still going to load all of the matching ManagedObjects into memory with a single fetch request (versus what UIKit can do with does with faulting, using an NSFetchedResultsController and UITableView's dataSource methods).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’19
Reply to @ObservedObject Issue
I have the same concern, having duly crammed parameter passes everywhere.Moreover, at one time this all worked well using BindableObject on the class and @ObjectBinding on the objective truth objects. When beta 5 arrived, I converted to ObservableObject, Identifiable and @ObservedObject. Having done that, the views no longer update. I've verified the external events happen, the objective truth variable changes, and the willChange.send() fires, but the views remain unsullied by any updates.My other two big gripes are (1) live views are missing, and (2) I can discover no apparent SwiftUI way to respond to orientation changes.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’19
Reply to User-generated controls
You're talking about input fields, and yes, a UI that provides the user with the opportunity to enter more data is common. You don't talk about why you need this, tho. There are many details via the Human Interface Guidelines and API docs, but without more details, including which platform you're targeting, those would make a long list, so... >completely new to mobile developmentAnd is there a specific reason you choose the swiftUI forum?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’19
Reply to Will SwiftUI be ready for its debut in this September?
It would be wise to hold off on releasing it, I think. For simple views, it's great, but I think there are a lot of things out there that need to be flushed out. There's no TextView for example. That was useful in my app. One Apple gent said that SwiftUI will be the end of view controllers. It seems like that's a ways off.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’19
Crash with Stepper on MacOS
I tried to write a simple view with a stepper, but it immediatly crashes on MacOS if I hover the mouse over the stepper in in NSHostingView.hoverRegionIdentifier(for:) ()struct ContentView: View { var body: some View { Stepper(onIncrement: { print(Inc) }, onDecrement: { print(Dec) }, label: { Text(Stepper) }) .frame(maxWidth: .infinity, maxHeight: .infinity) }}Is there something wrong or it is a bug in SwiftUI?I even tried to write my own view with NSViewRepresentablestruct MyStepper: NSViewRepresentable { func updateNSView(_ nsView: NSView, context: NSViewRepresentableContext<MyStepper>) { } func makeNSView(context: Context) -> NSView { return NSStepper(frame: .zero) }}struct ContentView: View { var body: some View { MyStepper() .frame(maxWidth: .infinity, maxHeight: .infinity) }}Same problem.
6
0
1.4k
Aug ’19
SwiftUI TextField re-renders the view after each character typed. How do I make it to re-render the view only after hitting the Return key? See the code below.
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)) } }}
5
0
5.0k
Aug ’19
Reply to SwiftUI TextField re-renders the view after each character typed. How do I make it to re-render the view only after hitting the Return key? See the code below.
What you're seeing is the correct behavior. When the @State value changes it re-runs the body to update the View. As far as I can tell, this is required by the TextField since beta 4 or 5. Previously, the text would stay as it was after typing, but now it only shows the new characters after its containing view is updated.What you see in SwiftUI is not the actual view, but a defintion object used to build and update the real view. Because of this, the view itself is not actually getting rebuilt. It's simply getting updated with the new text value.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’19
@ObservedObject change causes SwiftUI error
After changing my Combine code to the new @ObservedObject and ObservableObject changes in Xcode Beta 5, I am now getting Type of expression is ambiguous without more context on the following code: Var body: some View { ScrollView{ VStack{ HStack{ Image(systemName: clock.fill) Text(Text) <====TYPE OF EXPRESSION IS AMBIGUOUS WITHOUT MORE CONTEXT Image(systemName: dollarsign.circle.fill) } } } }Any suggestions???
1
0
2.3k
Aug ’19