Category "swiftui"

Xcode Preview Resume Button Shortcut

Is there a keyboard-shortcut to click the resume button in the canvas on Xcode Previews, instead of clicking it every time?

Newbie SwiftUI Nested array

Please help me display my model data from api I have a nested json data response and Have a swiftui model as below ****************************MyData model stru

In SwiftUI, where are the control events, i.e. scrollViewDidScroll to detect the bottom of list data

In SwiftUI, does anyone know where are the control events such as scrollViewDidScroll to detect when a user reaches the bottom of a list causing an event to ret

How to remove highlight on tap of List with SwiftUI?

How to remove highlight on tap of List with SwiftUI? List { }.whatModifierToAddHere? The selection manager documentation doesnt say anything about it.

Getting the result of input from one view to another SwiftUI [closed]

I have this view: struct CreateBoardView: View { @State public var BoardName: String = "" var body: some View { ZStack {

What is the "some" keyword in Swift(UI)?

The new SwiftUI tutorial has the following code: struct ContentView: View { var body: some View { Text("Hello World") } } The second line the

TextField in Table behavior

I'm trying to use the new SwiftUI Table with TextField's in each row. However, the behavior of the text field's is weird, for 3 reasons: Clicking on a text fiel

SwiftUI's keyboardShortcut is not working if Button has a buttonStyle

My code: Button(action: { AudioServicesPlaySystemSound(1026) isActive.toggle() }){

WidgetKit not work for an Intent Handler to Provide Dynamic Values

I am trying to implement a widget where the user can choose a city dynamically via an intent. I followed the step by step guide provided by apple here: https://

LazyVGrid inside a VStack inside a ScrollView among other elements causes a crash

Here's my view's code: ScrollView { VStack { someView LazyVGrid( columns: [ GridItem( .adap

How can I set the Dragging Image in SwiftUI on macOS

I am trying to change the preview image for drag and drop from the default for a GridView which seems to include all the visible items in the grid. As I underst

MapAnnotation, how can we decide the zIndex of an Annotation?

when using the MapKit.Map to display multiple Annotation overlapping, everything works properly whether you use MapPin, MapMarker or MapAnnotation. The tricky p

SwiftUI - menu not appearing and double toolbar for NavigationView

I am creating a iOS app with XCode. All source code has been written and compiled. The app runs in the iOS simulator. The user interface was created in SwiftUI

HTML-like table layout (i.e. auto-resizing table cells) in SwiftUI View?

I’d like to render a table of text cells in my SwiftUI View in a way, that every cell auto-resizes just so much that the text fits in it. So I did this:

Observe window resize event with SwiftUI

I currently have a LazyVGrid setup as such: struct NetworkGrid: View { var networks: [Network] let columns = [ GridItem(.flexible()),

Make Line chart gradient color go from line to bottom - SwiftUI

I am trying to make it so the line chart display a gradient color from the line and down but I can't seem to get it to only go from the line. Instead it just fi

Can't select a folder with UIViewRepresentable & UIDocumentPicker

I'm trying to create a picker for a user to choose a folder in a SwiftUI app. However, there doesn't seem to be any SwiftUI document picker yet so I was attempt

tracking down/working around UnsafeRawBufferPointer with negative count (presumably somewhere out of SwiftUI intestines/Swift runtime)

What do I do about this? I get no useful info predictably. A search for UnsafeMutablePointer yields func scrollViewWillEndDragging(_ scrollView: UIScrollView,

Is this the proper way to use PHPicker in SwiftUI? Because I'm getting a lot of leaks

I am trying to figure out if my code is causing the problem or if I should submit a bug report to Apple. In a new project, I have this code: ContentView() impor

Can I hide the text of the Sign In with Apple button? (a.k.a ASAuthorizationAppleIDButton)?

I am implementing Sign In with Apple on my iOS app (SwiftUI). In SwiftUI, I can use the 'SignInWithAppleButton' (https://morioh.com/p/524e0408008c), this button