I'm trying to create rounded edges in one of my views using overlay. .background(Color.gray.opacity(0.2)) .overlay( RoundedRectangle(cornerRadius: 10)
I'm developing an app for iPad with SwiftUI. I want to present a page sheet but with a smaller size. I'm using but I can't change the width of the page sheet.
QLPreviewController navigation bar missing when I presented in sheet. It looks like this : How can I show up top navigation bar or navigationItem? QuickLook
Command i am running is brew install cocoapods Warning: cocoapods 1.11.2_2 is already installed and up-to-date. To reinstall 1.11.2_2, run: brew reinstall
How to underline a UILabel in Swift? I searched the Objective-C ones but couldn't quite get them to work in Swift.
This is actually a two part question. First take a look at the code: //canEditRowAt func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath)
I searched stackoverflow, but unfortunately didn't find a solution to this particular case. I try to display following scenario: a container view a Text that
I have a synchronous function that calls an asynchronous sub function. Now I want to test that the synchronous function sets a property. I've seen many examples
I want to pause my app at a certain in point. In other words, I want my app to execute the code, but then at a certain point, pause for 4 seconds, and then cont
I have the following code: var encryptedByteArray: Array<UInt8>? do { let aes = try AES(key: "passwordpassword", iv: "drowssapdrowssap") encrypt
I'm using a swift dictionary of type [UIImage:UIImage], and I'm trying to find a specific key for a given value. In Objective-C I could use allKeysForValue, bu
I'm trying to get rich notification and play video on the notification. I success to show an image and not found swift sample code. What need to be done to add
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
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