Ios swift – create a blur effect on signin
I have created a login page but I am trying to add a view to encapsulate the textfield and add a blur effect. Below is the current code I have: var body: some View { ZStack() { VStack(spacing: 16) {…
I have created a login page but I am trying to add a view to encapsulate the textfield and add a blur effect. Below is the current code I have: var body: some View { ZStack() { VStack(spacing: 16) {…
Swift beginner here. I am trying to create a reusable component that simply renders either a filled or empty systemImage circle based on a value stored in state. I've put together a reproduction example below. Right now it only appears…
When attempting to replicate the behaviour of Finder and SF Symbols in a macOS application using SwiftUI, I encountered difficulties with DisclosureGroup. Here is my current code: import SwiftUI struct SidebarView: View { @State private var companiesExpanded = false var…
I have been facing this problem in the newest Xcode version, Version 14.3.1. I was following the codes from Hacking With Swift, 100 Days of SwiftUI. While following the guy's code, I faced the problem: " failed to produce diagnostic…
I want to automatically scroll to a particular view in a ScrollView on tap of a button. I know how to get it to work with ForEach views (there are examples of this online and on Stack overflow) but I…
When I use this block of code, I want ScrollView and ForEach views to expand when new items are added to ForEach view. But currently it just fills some space that is larger than the view inside ForEach block. How…
I want to hide TabView bottom TabBar if user navigate from next screen. For example I have TabView that have two tabItem let's say Home and Account and home screen have notification option if user click notification I want to…
I'm trying to apply this mask to the original image Notice there are some grey areas, I want to keep everything except PURE black. I've found this code func maskImage(image: UIImage, mask: UIImage) -> UIImage { let imageReference = (image.cgImage)!…
How to detect drag events for the stack when drag action have started outside of the stack view? On the screen are placed the main stack/view (GREEN) and sub-stack/view (RED). I need to implement functionality which detects swipe/drag interaction for…
Let's say I have the following layout: VStack { Text(title) .frame(maxWidth: .infinity, alignment: .leading) Spacer() Divider() .frame(height: 1) } .frame(minHeight: 80, alignment: .bottom) I want the text field to expand freely, divider to be aligned to the bottom, and the…