Category "swiftui"

NavigationLink is grayed out and does not perform any action [duplicate]

import SwiftUI struct ContentView: View { var body: some View { NavigationLink(destination: DetailView()) { Text(

SwiftUI animation not continuous after view change

Here is the testing code: import SwiftUI struct ContentView: View { @State private var pad: Bool = false @State private var showDot: Bool = true var body:

Failed to log metrics

There is no Buildtime or runtime error on my code. however, when I run the code it says succeeded and a black screen comes up. I get the following on my console

Why is are the images being cut off?

The images in my 'tiles' are being cut off at the sides. I am trying to create a tile for each 'product' that displays an image, name and subtitle. Everything n

RoundedRectangle background colour does not crop and TextEditor transparent background

I have a messaging interface. When user types in to the texteditor it will be append to messagesDBArray and will be displayed in textview. Once new messages are

SwiftUI - Custom map pin's onTapGesture action is selecting a wrong pin view when there are group of pins in the save position(Zindex bug)

My map code is actually really simple: // // ContentView.swift // MapTest // // Created by Asi Givati on 24/04/2022. // import SwiftUI import MapKit import

I can't draw responsive custom button with Path in SwiftUI ( I used Paint Code)

I was using PaintCode app for line to code. But I can't use this code.. Because this code is not responsive.. I don't want button sizes to be static. I don't wa

SwiftUI Preview incorrectly tries to build conditional dependency from another platform

SwiftUI Previews are broken for me when one of imported Swift Package has a conditional dependency to another platform. Steps to reproduce: Create Xcode Project

SwiftUI App crashes after second continuous open

I have a working SwiftUI app with a start animation that appears to sometimes cause it to crash - this happens only when the user quits the app completely right

How to use Button SwiftUI correctly?

There is a code that, by pressing the "Sign Up" button at the bottom of the screen, should open another window. But for some reason, when you click on the butto

Keeping texts of different sizes aligned at top as the dynamic type size increases

I'm trying to align texts of different sizes at the top so that they stay aligned when the Dynamic Type size changes. import SwiftUI struct ContentView: View {

SwiftUI: trigger redraw when NSManagedObject (not part of fetch request) bool property changes?

I have the following @SectionedFetchRequest installed on my SwiftUI view: @SectionedFetchRequest(entity: Car.entity(), sectionIdentifier:

One working ScrollView example and one refusing example

This is a working example of a ScrollView: var body: some View { ScrollViewReader { proxy in VStack { Button("Warp to line 10 o

Set not Removing Duplicate Dates

I have a structure that displays entries sorted by date. The date is displayed once for all entries of the same date. The problem I have is that Set is not remo

SwiftUI 3: automatic keyboard avoidance for TextField in a ScrollView doesn't include padding

The automatic keyboard avoidance feature in (SwiftUI 3) doesn't move TextField up correctly if that TextField has a padding around and is inside a ScrollView. H

SwiftUI: Update height of an existing row in list

I'm new to programming in SwiftUI. I created a list of a custom view that expands on tap. However, whenever I tap the custom view, the height of the list row do

continuous center of user with Mapkit

Good afternoon, I am having trouble displaying a map where it only centers around the user and will stay on the user with movement. My error is in my view file

continuous center of user with Mapkit

Good afternoon, I am having trouble displaying a map where it only centers around the user and will stay on the user with movement. My error is in my view file

Etymology of "sink" in SwiftUI / Combine?

I'm joining development on an existing SwiftUI / Combine iOS project, which is my first exposure to the technology. The names of functions like assign(to:on:) a

Unable to identify bug where final iteration (index) in ForEach does not update the view (SwiftUI)

Original question/post: Below is a snippet from an educational animals app for kids that is currently in beta testing. The below represents cards in a tab view