Category "swift"

SwiftUI NavigationView nested in PageTabView wrong aligned on first appear

The NavigationViews inside my PageTabView are wrong aligned on first appear. When i scroll to another page on my PageTabView and go back to the first page, the

Create a Timer Publisher using Swift Combine

I've been watching the Data Flow Through SwiftUI WWDC talk. They have a slide with a sample code where they use a Timer publisher that gets connected to a Swift

Autolayout warning when using prompt in navigation bar

I am using a navigation bar with a prompt, looking like this: I receive the following auto layout warnings in the console: 2019-09-01 21:26:03.225576+0200 Ho

SwiftUI select multiple item in a lazyhgrid

With SwiftUI this is my current code: import SwiftUI enum Items: String, CaseIterable, Equatable { case item1 case item2 case item3 case item4

SwiftUI MacOS Inset paddings of List

i have a scrollale list view using SwiftUI on a macOS app and i'm trying to add paddings inside the scrollable area, without success. Here my code: List(appList

Crash when init a Range from NSRange

I got a crash report on Crashlytics with this following exception. Fatal Exception: NSInvalidArgumentException -[__NSCFString characterAtIndex:]: Range or index

Detecting a tap on a marker in a forEach Loop and print

To detect a tap on a marker on GoogleMaps I should use this function. func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool { print("Do w

Package resolution failed. Couldn't get the list of tags

Can't add new dependency via SPM and always see this error fatal: bad numeric config value 'null' for 'tag.forcesignannotated': invalid unit Clean derived da

How can I read the value of an RxSwift property? <Driver>Bool

I'd like to read the value of a property var checkInEnabled: Driver<Bool> { get } I only need to to run a bit code once when the class has loaded, so I d

my flutter IOS project showing error "clang: error: no such file or directory: 'UserNotifications' Command Ld failed with a nonzero exit code"

Showing Recent Messages Ld /Users/shibi/Library/Developer/Xcode/DerivedData/Runner-abrxzfquusadvleimfabdvpysbkr/Build/Products/Debug-iphonesimulator/Runner.app/

Why so many debug error using ARKit and RealityKit?

On my project I simply wrapped a ARView, setup a configuration and run it on my real device, when I start the app Xcode print out the following error debug mess

Undefined symbol: nominal type descriptor for Swift.UInt8

I am trying to run react native app in a Mac Mini with Apple M1 chipset.The project run well on intel based system but not running on M1. When I build I got fo

ARFaceTrackingConfiguration – Depth map not aligned

I'm working currently of getting depth map from an ARFaceTrackingConfiguration but I have some trouble with this, because it's like the depth map drift a bit fr

Transparent TabBar when popping Child NavigationView iOS 15

I have a SwiftUI application with a TabBar. If I open a detail child view from a NavigationView, and then click on "Back", the TabBar would become transparent,

Navigation stuff in SwiftUI

I'm trying to figure out how to use the navigation bar in SwiftUI I want to put BarButtonItem and images inside the NavigationBar I have been able to display

UITextView cutting off last line of text

I am trying to render out a UITextView within a UITableViewCell. For some reason the last line of my text is being cut off. I have followed numerous posts on h

How to detect a tap gesture location in SwiftUI?

(For SwiftUI, not vanilla UIKit) Very simple example code to, say, display red boxes on a gray background: struct ContentView : View { @State var points:[C

What does the dollar sign do in Swift / SwiftUI?

This tutorial by Apple about SwiftUI uses a dollar sign to bind data, and I‘m having trouble finding more information about this data binding in SwiftUI.

How to change icon color in UIAction inside UIMenu? [duplicate]

Trying to change icon color in UIAction but changing tint does not seem to work at all. Any idea? let imageView = UIImage(systemName: "eye")!

Stop Diffable Data Source scrolling to top after refresh

How can I stop a diffable data source scrolling the view to the top after applying the snapshot. I currently have this... fileprivate func configureDataSo