Category "swiftui"

Blank Map with Mapbox and SwiftUI

I try to use Mapbox with SwiftUI. I applied this answer https://stackoverflow.com/a/56551675/5653544 and also followed the mapbox tutorial. So I have a MapV

SwiftUI: How to do additional work when clicking a NavigationLink?

Right now I have a navigation link NavigationView { NavigationLink(destination: AnotherView())) { Text("Click Here") } } .navi

Which watchface uses CLKComplicationTemplateGraphicExtraLargeCircularView?

Is there a documentation/web page on which Apple Watch watch faces uses which complication types? I am trying to find which watch face uses CLKComplicationTempl

SwiftUI how to align the view‘s leading to the most super view’s leading?

I’m new to SwiftUI and I’m making a widget. The default code included a text view which is both x-centered and y-centered in the super view(which I

I'm trying to use "objectWillChange.send()" in an protocol extension but it's not working, any idea why?

I've a SwiftUI navigation view showing a list of players. I designed the view model protocols as follows. protocol PlayerListStateProviding: ObservableObject

SwiftUI - How can I blur the default background color of a view?

no code to show here, but I would like to know how it may be possible to do this. I have tried to use .blur(radius: (20) on a view, but it tends to blur the

SwiftUI UIApplication.shared.isIdleTimerDisabled = true just on one View

How can i turn Sleep off when just one View is Appeared ? UIApplication.shared.isIdleTimerDisabled = true stop the screen from going to sleep on every View. how

SwiftUI: How do I "zoom in" to a specific CardView on a tiled interface?

I am trying to build a tiled interface out of CardViews. I want the user to be able to tap on a Card and have that Card expand to take up the available space,

SwiftUI List rows in Edit Mode do not allow Buttons actions/NavigationLinks to work?

SwiftUI List rows in Edit Mode do not allow Buttons actions to work I note (as well as NavigationLinks too). Is there a way to get this working? Goal - Want

SwiftUI + Dynamic action closure for Button

I am exploring SwiftUI and I was able to create a subclass of Button. The subclass contains image & title properties, which makes it a reusable component.

Binding value from an ObservableObject

Aim: I have a model which is an ObservableObject. It has a Bool property, I would like to use this Bool property to initialise a @Binding variable. Questions:

UIDocumentPickerViewController in SwiftUI on mac (macCatalyst)

So I've been meddling with "moving" a small SwiftUI iPad app to the Mac, and I've hit a bit of a speed bump with UIDocumentPickerViewController. I have wrapped

Button border with corner radius in Swift UI

I'm trying to set a rounded border to a button but the border of the button is not correct. Code: Button(action: { print("sign up bin tapped")

Deletable Table with TextField on SwiftUI

Environment Xcode 11.2.1 (11B500) Problem In order to implement editable teble with TextField on SwiftUI, I used ForEach(0..<items.count) to handle index.

How to perform an action after NavigationLink is tapped?

I have a Plus button in my first view. Looks like a FAB button. I want to hide it after I tap some step wrapped in NavigationLink. So far I have something like

SwiftUI - nested list

I'm trying to create a nested hierarchical list, so that for each task I can have subtasks like in iOS reminders app: First attempt was to embed another list

SwiftUI Create property with the application's local notification .authorizationStatus

I'm looking to create a property that will track the user's notification authorization setting for the application. (The ultimate goal here is to alert the user

How to reverse SwiftUI ZStack order?

trying to recreate a next/previous item on a stack of cards. I have my cards in a ZStack. The problem I’m having is that by default ZStack are in reverse

Unable to hide the navigationBar when embedding SwiftUI in UIKit

I am trying to hide the navigationBar when putting some SwiftUI inside of a UIKit UIViewController: override func viewWillAppear(_ animated: Bool) { super.vi

OTC View autolayout in SwiftUI

I'm new to swiftui and swift basically, i made One-time-code screen, and here i have a problem. When i run project on my old phone (iphone 6) when keyboard appe