Category "swift"

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

Avoid Equatable and Hashable boilerplate, Swift 4.2

On project we are using classes for model's layer and because of that I have to write code like this: // MARK: - Hashable extension Player: Hashable { stat

Center View horizontally in SwiftUI

How can I center horizontally a View (Image) in an HStack? I want a button to be left aligned and the image to be centered horizontally the view. Currently I ha

Diffable Data Source with a custom collection view layout?

Here I have created a sample app that uses diffable data source for a collection view with a custom collection view layout. The specific layout I am using is fr

App Icon Only Changes After Device Reboot

I am implementing custom app icons for my iOS app, and everything works in the simulator. But when I try on device I get errrors: +[LSApplicationProxy applicati

Xcode Canvas for SwiftUI previews does not show up

I´m trying to get the new Canvas feature from Xcode 11 running, but the Canvas won´t show up. What am I doing wrong? This new Xcode feature should s

iOS 14 UIColorPicker eyedropper tool not returning selected color

I am currently trying to implement the new iOS 14 UIColorPicker. Everything works great, except the eye dropper functionality of the UIColorPicker. After select

iOS: How to listen hotspot turn on, turn off notification events

I am working on an application where I need to observe the hotspot events e.g. there must be a callback when the mobile hotspot turn on also when turn off. I ha

How to use UIApplicationDelegateAdaptor as ObservableObject?

In my iOS 14 App, I can register the legacy AppDelegate by doing this: @main struct MyApp: App { #if os(iOS) @UIApplicationDelegateAdaptor(AppDeleg

Deserialize double array

I try to deserialize some JSON on Swift 4.2 with Codable Protocol. My Json: { "status":1, "data":[ [ { "id":"4klJeiCKTs

SwiftUI Localize Raw Strings

In SwiftUI how can i get my raw string localized? Text(#"Hello \\\\"#) Adding this to the localized file will not work. "Hello \\\\" = "is not translated \\\\"