Category "swiftui"

how to do a simple scaling animation and why isn't this working?

i just read in stackoverflow i can only concatenate animation with delay, so i tried this here which simply shrinks and then scales the circle again. unfortunat

SwiftUI - Button with Image is clickable outside

I have a ScrollView with multiple Buttons. A Button contains a Image and a Text underneath. As the images are pretty large I am using .scaledToFill and .clipp

Custom Button in SwiftUI List

SwiftUI Custom Button in List I'm trying to create a custom button in a SwiftUI List. I want it to have a blue background with white text, and importantly, to

Remove default padding from List in SwiftUI

When using ScrollView the views inside it are spread across the whole screen width by default, but when using List, there is a padding on the sides. Is there a

SwiftUI using NSSharingServicePicker in MacOS

I am trying to use a Share function inside my MacOS app in SwiftUI. I am having a URL to a file, which I want to share. It can be images/ documents and much mor

Problem animating with animatableData in SwiftUI

SwiftUI not only gives us get automatic animation… it lets us control how the animation occurs, using the animatableData property. So cool! Only I

How to implement AdMob Open Ad in a SwiftUI project with SwiftUI App Cycle?

I'm trying to implement AdMob open ad in a SwiftUI project using Google's documentation: https://developers.google.com/admob/ios/app-open-ads. The problem is th

SwiftUI: Pop to root view when selected tab is tapped again

Starting point is a NavigationView within a TabView. I'm struggling with finding a SwiftUI solution to pop to the root view within the navigation stack when the

How do I split a TextField into characters?

enter image description hereSo basically, I want to put the word(s) inputted into a TextField into an array, but also split the word(s) up into separate charact

SwiftUI : How to set image in MacOs?

please help me to set image in macOs application using swiftUI Here is my Implementation: import SwiftUI struct SigninView: View { var body: some View {

SwiftUI modal presentation works only once from navigationBarItems

Here is a bug in SwiftUI when you show modal from button inside navigation bar items. In code below Button 1 works as expected, but Button 2 works only once: s

What happens when you apply an idealHeight to a Spacer's frame in SwiftUI?

I'm curious what SwiftUI is doing under the covers when applying an idealHeight to a Spacer's frame. Will the Spacer use the idealHeight as its target height bu

SwiftUI: List does not update automatically after deleting all Core Data Entity entries

I know SwiftUI uses state-driven rendering. So I was assuming, when I delete Core Data Entity entries, that my List with Core Data elements gets refreshed immed

SwiftUI: upload multiple images to Firebase

Goal: upload 3 images from SwiftUI app to Firebase, with different URL for each. Problem: I only managed to upload 1. What I have tried (but didn't work).... :

How to make inner shadow in SwiftUI?

How can I use Inner Shadow on a Rectangle()? Rectangle() .foregroundColor(.green) .frame(width: 400, height: 300) I can only manage t

SwiftUI - Pulsating Animation & Change Colour

I'm trying to change the colour of my animation based on the state of something. The colour change works but it animates the previous (orange) colour with it. I

Dismiss a parent modal in SwiftUI from a NavigationView

I am aware of how to dismiss a modal from a child view using @Environment (\.presentationMode) var presentationMode / self.presentationMode.wrappedValue.dismiss

SwiftUI: DatePicker is it possible to display date/time in other timezone then current?

In UIDatePicker we can do something like this datePicker.timeZone = TimeZone(secondsFromGMT: 5*60*60) in order to specify timezone of datepicker. But how

SwiftUI drag gesture across multiple subviews

I'm attempting to create a grid of small square views, that when the user hovers over them with their thumb (or swipes across them), the little squares will tem

How do I properly test a var that changes through a publisher in my viewModel in XCTestCase

Im trying to test a simple publisher within the Combine framework and SwiftUI. My test tests a published bool named isValid in my view model. My view model al