I'm trying to render an MKMapView into an UIImage, without showing it on the screen. I init the map: let mapView = MKMapView(frame: CGRect(x: 0, y: 0, width: 1
Basic approach I am currently tring to clean up my Core Data/SwiftUI code, and part of that is moving code out of my Views and into my ViewModels. Since it seem
I have the following protocol and a class that conforms to it: protocol Foo{ typealias BazType func bar(x:BazType) ->BazType } class Thing: Foo {
I have an array which I will store all data that I get from http request and display them on tableView but it seems that tableView(numberOfRowsInSection) does n
I have a value which seems to be an Int but when I do type(of: value) it returns Optional<Any> and after trying many things I figure that data type NSStri
There's a position which is SIMD3 and there's AnchorEntity. I want to get distance between two. How I did it: var distance = distance(position, (self.modelentit
I have made project with ARKit that uses metal shaders to perform a mirroring effect, and this is assigned by using sceneView.technique. I am trying to figure o
I have a project that was started in Objective-C, and I am trying to import some Swift code into the same class files that I have previously written Objective-C
I am use auto layout. Following is the initial state of the view. In the centre is a button contained in a view. The button has contentMode Aspect Fill, and t
Given that the code var latitude = userLocation.coordinate.latitude returns a CLLocationDegrees Object, how can I store the value in to a variable so that I
I placed 3d object to ARViewController after 3 seconds of placing object, then I want to rotate object by 90 degrees: arView.scene.addAnchor(anchorEntity) Disp
When I develop the feature that allows users drag ScrollView to dismiss keyboard in SwiftUI, I find that if you drag ScrollView as the keyboard is dismissing, t
I have ModelEntity in SwiftUI and it moves. But the problem is: when adding generateCollisionShape method, it doesn't move anymore. I want a collision effect as
I have stored the letters(String), numbers(Int16) and Date(Date) in the core data. And the filter(NSPredicate) succeeded in organizing only the necessary data.
I am creating a edit view in SwiftUI for Mac OSX. A user can change his profile. At the moment I am using default Text() elements to view his current values/set
I have 2 arrays: var list:Array<Int> = [1,2,3,4,5] var findList:Array<Int> = [1,3,5] I want to determine if list Array contains all findList elem
I have a string which is "Optional("5")". I need to remove the "" surrounding the 5. I have removed the 'Optional' by doing: text2 = text2.stringByReplacingO
I haave a file (exists in main bundle with target membership checked) named matrix.usdz and need to load it with do { let path = Bundle.main.path(forResour
I found the new method in SwiftUI to allow you to create an exponent. Here what I write code is based in SwiftUI on the Swift Playground. import SwiftUI impo
I have an iOS app with deployment target iOS 10+, I need to add some features that depend only on RealityKit to appear with users whom their iOS version is 13+,