I've been experimenting with SwiftUI and couldn't figure out how to get a simple UIToolbar to appear at the bottom of the screen.Basic view:struct MyView : View { var body: some View { NavigationView { List { NavigationButton(destination: Text(1)) { Text(Element 1) } // ... }.navigationBarTitle(Text(Elements)) } } }
Search results for
swiftui
16,583 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Can anyone help me in displaying the SKCloudServiceSetupViewController in SwiftUI to ask the user to subscribe to Apple Music. Thanks!
In the latest iOS, the keyWindow automatic version of SKStoreReviewController.requestReview() got deprecated in favour of a new SKStoreReviewController.requestReview(in windowScene: UIWindowScene) version. Then, in the latest SwiftUI, the UIWindowScene got removed in favour of a new SwiftUI some Scene family. How do I efficiently tie the two together in a View without resorting to the key UIWindow?
In iOS when a button can be actioned it is coloured accordingly so the user knows to tap. This is a standard across the platform. Is there a standard for long press gestures? In the case of swiftUI the 3D Touch/ long press can show a contextMenu. How best to indicate to a user to long press? Is there a standard colour for example to show when an element is to be long pressed?
I'm having a problem where any buttons won't be shown when displaying a QLPreviewController with swift. With .quickLookPreview() these buttons are shown, including share, done, annotation etcetera. The buttons are not shown when using QLPreviewController with SwiftUI, however if used with other UIKit they are shown. How to fix this? I'm not really looking forward in implementing all of the annotation functions and other QuickLook capabilities again. The ultimate goal of mine is to allow annotation and other pdf editing with the ability to save the file via the Done button, but on .quickLookPreview() the Done button displays Save to files and Discard and on QLPreviewController the button is not shown. The issue has been addressed on several forums, yet a solution has not been found. Reproducement in nutshell: new QLPreviewController conforming to UIViewControllerRepresentable display the QLPreviewController in SwiftUI view Thanks.
Is there a recommended way to create a search field in SwiftUI and have it interact with a NavigationView or is it now to be treated as a separate thing?
I have an app made in UIKit with a deployment target of 9.0 which I would like to apply SwiftUI to. I would like my app to use SwiftUI while still being compatible with iOS 9.0 and later. Does anyone know how to achieve this, because SwiftUI is only in iOS 13.0 or later
Is there a way to handle events that were in UIApplicationDelegate or UISceneDelegate in SwiftUI App lifecycle?
I have a project i want to add video download on every website, how can I do it in swiftui .
What are the best practices for building for the iPadOS pointer when primarily building with SwiftUI?
Friends, With ⌘+⇧+A we have access to Embed a SwiftUI view into an HStack, VStack, ZStack, List, or Embed/Wrap it into any other Container. The question is: How to unembed it? How to productively remove/unwrap a view from those containers without having to manually remove the brackets. Someone used to Flutter will understand what I mean.
I have a SwiftUI LineMark chart that inverts the y axis when the data the chart is plotting is all zeros. I'm expecting the y axis 0 to be at the bottom but when the data is all zeros it's at the top. Below is an example demonstrating the problem: import SwiftUI import Charts struct ChartView: View { let data: [Double] = [0,0,0,0,0] var body: some View { Chart { ForEach(data.indices, id: .self) { index in LineMark( x: .value(Index, index), y: .value(Value, data[index]) ) } } .chartYAxis { AxisMarks(values: [0, 10, 20, 30, 40, 50]) { value in AxisValueLabel() AxisTick() AxisGridLine() } } .padding() } } I can't use .chartYScale(domain: ) because it overrides the chartYAxis where the real code creates custom a leading and trailing y axis. Does anyone have any suggestions how I may fix this?
Hi, need some help with an iOS application we are trying to make future safe. Basically, we know that our app would require SwiftUI so the app is made in that framework, however we require some important elements that are available only in UIKit, so we've made a bridge that allows us to pass UIKit views to SwiftUI to display them. So most of the app actually has UI made in UIKit, however, we now need to use the Charts framework present in SwiftUI, we've used SwiftUI buttons in our UIKit before by passing them through a HostingController (Passing SwiftUI buttons to UIKit to use). And we are currently considering to the same for SwiftUI Charts. Just to recap, it's a SwiftUI iOS app, that is mostly made in UIKit (through a bridge) but also has other SwiftUI elements injected into it. What we want to know that, is this the best way to do this? Or is there a better way to have UIKit and SwiftUI work more comfortably with eachother. Th
I have used cloudkit for years untill swiftUI came out. I just dont get how to instigate it. Are there any samples of how to use Cloudkit with SwiftUI?
What are the best practices to implement login views for user authentication with SwiftUI Xcode 12? Thank you