In SwiftUI I got error when I use SignInWithAppleButton in SplitReplacementHostingController I got crash Fatal error: Attempting to present ASAuthorizationController from a SwiftUI view not in a heirarchy. This should not be possible, please file feedback.: file _AuthenticationServices_SwiftUI/SignInWithAppleButton.swift, line 300 Fatal error: Attempting to present ASAuthorizationController from a SwiftUI view not in a heirarchy. This should not be possible, please file feedback.: file _AuthenticationServices_SwiftUI/SignInWithAppleButton.swift, line 300 When I place the same button to first screen in the app it works Mainly it is because I have Sidebar and NavigationView which is preferred for the macOS so when I have the two column placeholder there as the button it works but when I navigate via NavigationLink it stop working I used Xcode 12.2 beta 3 (12B5035g) Big Sur 20A5395g
Search results for
swiftui
16,584 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am coming from C#, where Forms and Controls are placed similar to Swift Storyboards. I have been trying to learn Storyboards, but keep running across tutorials regarding SwiftUI, and Storyboard examples are few. So the question becomes, how do I position controls on a Form using SwiftUI? See the example below. I have run across many videos that use either horizontal or vertical positioning of controls, but these examples are usually very simple, with items occupying only the center portion of the screen. I get stuck on examples that are more complicated. The example below only shows the controls for the upper part of a Form, with some type of textbox (Viewform) below making up the rest of the Form. How does one make more complicated placement of controls with SwiftUI?
I have a working XIB App to run a Linux VM with graphics interface. I am trying to rewrite it in SwiftUI but fall into all sorts of problems when using a combination of a Representable of the VZVirtualMachineView, an associated Coordinator, and @StateObjects. a) The VM display is not updated when running but is displayed if I close the window and reopen it. As the underlying VZVirtualMachineView is created/dismantled many times, there are warnings about negative scanouts that end up crashing the App b) Keyboard focus is not really working. https://developer.apple.com/forums/thread/766014 reports that there is probably a solution making a NSViewControllerReporesentable rather than a VZVirtualMachineViewRepresentable. I think I am fighting against proper SwiftUI lifecycle and would love to have a hint at what shall be the right organization of model and SwiftUI constructs.
From the Designing with iOS Menus - https://developer.apple.com/videos/play/wwdc2020/10205 and Building with iOS Menus - https://developer.apple.com/videos/play/wwdc2020/10052/, it was clear that we should replacing many of our action sheets with menus. I couldn't find how to do that with SwiftUI though. The only thing that I am seeing is still .contextMenu, which would appear after a long press. Am I missing something, or does SwiftUI lack support for this new approach?
The original release of SwiftUI required wrapping UIImagePickerController to access the camera. Has there been any update to this approach among the updates to SwiftUI announced at WWDC 2020?
Hi,I have some specific questions (help) with SwiftUI for iOS. Where is the best place to ask them?Thanks,Dan Uff
i'm learning about swiftui and machine learning(by python pytorch). I want to use machine learning in swiftui like coreml or vision. but, almost reference of coreml or vision are written in uikit. so, any references(book or lecture or document, yotube) to machine learning with swiftui?
Hello I wanted to ask if you know where I can start learning CoreML CreateML and integrate them with SwiftUI (NO UIKit please) Thank You
Hello. I want to do a fetch when a view loads. In UIKit I would have used viewDidLoad to do this but in SwiftUI we only have onAppear and task. Is that by design, and if so, what is the recommended way to fetch data? I wrote a little blog post for a workaround describing the issue and the found solution, but I presume there is a better way. https://www.ludafux.com/post/viewdidload_doppelganger Best Regards, Luda
Hi,I'm trying to slowly add SwiftUI ViewControllers to an existing UIKit app.With the iPhone and iPad and using a storyboard and hostingcontroller, I use the below code to go from a UIKit ViewController to a SwiftUI view:@IBSegueAction func SwiftUIAction(_ coder: NSCoder) -> UIViewController? { return UIHostingController(coder: coder, rootView: SecondController())The above code does NOT work with the AppleTV, and it doesn't give me an error (or I would put it here) What am I missing?Thanks,Dan Uff
I have been a web developer for about 10 years. My goal when I started was to be an apple developer. I am finally diving into that world. I’ve been learning SwiftUI with the understanding that I can use the same code to built for iOD and MacOS. I found a snippet that lets me check this at compile, but is that the right way to do this. Is there documentation on what the right way to do this is? As I would intend to have completely different views for the Mac and iOS
As of iOS 13 with the new card style default presentation of modal view controllers users can dismiss these with a downward swipe gesture by default. If this behaviour is not desired isModalInPresentation can be set to true to disable it. In SwiftUI the sheet modifier does not seem to expose this option and will always be dismissed. An alternative is to use fullScreenCover — but this loses the card effect. Is there an option to prevent dismissing SwiftUI sheets using the gesture mentioned?
Anyone got any idea when all of the great new SwiftUI stuff issuing to come through in Apple's excellent learning to program course?
Has anyone used the SwiftUI sin func for a value that's a multiple of pi. When I try I get a very strange number and I believe it should be 0.
Hi, is there a way to cache the data from the SwiftUI ArtworkImage across App starts and maybe even for offline use? Best regards Julian