Category "swift"

How do I convert JSON with variable variable names into swift object?

I am working on a project with an API which gives me a JSON Object with some data in a variable. But the name of the variable under which the data is provided c

Clickable area of SwiftUI Picker overlapping

I am currently trying to create a page with three adjacent Picker views inside of an HStack as seen below: I made a CustomPicker view where I limit the frame t

SwiftUI strange behavior when moving items between sections in a List

so I've been trying to make a component using swiftUI that allows you to move items in a List between sections. I prepared an example with two sections: "First

Excluding files in Swift Packages

To exclude entire sections of a file, I can use macros to target platforms such as #if os(iOS) || os(watchOS). Is there a way to do this in Package.swift, or

Challenges with RealityKit and ARKit

I want to build a demo app in ARKit and I have some questions about what is currently possible with the beta (Apple has been calling this RealityKit, or ARKit 3

dispatch_once after the Swift 3 GCD API changes

What is the new syntax for dispatch_once in Swift after the changes made in language version 3? The old version was as follows. var token: dispatch_once_t = 0

What's the difference between ARAnchor and AnchorEntity?

I'm currently doing some experiments with RealityKit. I've been looking at some sample code, and I'm a bit confused about the differences between ARAnchor and

"No such module 'Firebase'" when add Firebase into a library

I just created new Framework and added Firebase via CocoaPods, when combine the library it success. But when I add that library to other project via CocoaPods

Access view file from UICollectionViewListCell

I have a question about the UICollection view list's separatorLayoutGuide. I saw this article and understood I need to override the function updateConstraints()

How to definitively set UITabBar background color and tint color

I have been trying to set my UITabBar's tint color and background color for quite some time now and nothing seems to work. So far I have tried: tabBarControll

Cannot use mutating getter on immutable value: 'self' is immutable error

I'm trying to reuse an older piece of Swift code, but getting an error 'Cannot use mutating getter on immutable value: 'self' is immutable error'. Xcode wanted

IOS Invoke SDK functions of SDK in capacitor plugin

Andoird was done without difficulty but I'm very new to IOS(OC/swift) Follow instruction of sdk doc, imported sdk into umbrella header Able to call sdk from mai

Class _PointQueue is implemented in both when I click on textfield... How can I resolve this issue?

I'm using xcode 13 and making a demo on coredata. objc[6188]: Class _PathPoint is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhon

ERROR: Runner.xcworkspace does not exist. error implementing google maps

I'm trying to implement GoogleMaps into my flutter project, it works fine for the android version, but with the iOS version I'm facing some problems. The error

ERROR: Runner.xcworkspace does not exist. error implementing google maps

I'm trying to implement GoogleMaps into my flutter project, it works fine for the android version, but with the iOS version I'm facing some problems. The error

building for iOS Simulator, but linking in object file built for iOS

Before I integrated Google Places in my app, I had no problem running it on simulators, but now I can run my app only on physical devices. I tried excluding arm

How to pass one SwiftUI View as a variable to another View struct

I'm implementing a very custom NavigationLink called MenuItem and would like to reuse it across the project. It's a struct that conforms to View and implements

Force AutoFill Save Password dialog programmatically

I setup Password AutoFill in my iOS 14 app. The app uses multiple tabs. Associated Domains are also set up. All works as expected. I have a Test button below th

About using Swiftz library issues(Functional programing)

Recently I'm learning functional programing using swift programing language, and found a library named Swiftz, I found a very strange way to call function and w

How to set a known position and orientation as a starting point of ARKit

I am starting to use ARKit and I have a use case where I want to know the motion from a known position to another one. So I was wondering if it is possible (lik