How to set the corner radius to 50% – Ios swift
I have an image view inside a collection view cell. I would like to set the corner radius of the image to 50% of its width (so it's a circle). How can I do this? Here's my code so far…
I have an image view inside a collection view cell. I would like to set the corner radius of the image to 50% of its width (so it's a circle). How can I do this? Here's my code so far…
So I have this String "green" inside a constant (lernset.color). I would like to set a .foregroundColor() to a symbol (systemName: "folder") inside of a list, so that it has the same color as written inside the constant (lernset.color). The…
Okay so we all know that in traditional concurrency in Swift, if you are performing (for example) a network request inside a class, and in the completion of that request you reference a function that belongs to that class, you…
I've recently been building an app under iOS 15 (latest as of writing this code), and when I shipped a version of my app to test flight, one of my users sent me a video of the app working, and…
I'm trying to add documentation to my code in Xcode. I've followed a couple of articles that suggest my markup should work with Xcode preview (https://nshipster.com/swift-documentation/ and https://sarunw.com/posts/swift-documentation/) but the bullet point list isn't displaying. Have I missed something obvious?…
(Sorry for bad quality image,Edited my question to make it understandable) Main I have labelled my screens in the image so its is much better. Im using navigation controller on Screen A to go to Screen B. But screen B…
I have a navigation link and I need a different behavior when its label (MyView) is tapped depending on the edit mode (or any other condition): If we are not in edit mode, I want to trigger the navigation link…
I have a picker that will change an attribute of an object that is bound to the view. When the picker is changed I want to update the bound object so the change is apparent in the previous view. The…
New to the iOS land. I am using an old Mac with OS Catalina 10.15.7, XCode 12.4, Swift 5.3.2 I need to use the async function in my Swift project, checked and found that it is only supported since the…
Say I have this code: class Presenter { var viewToUpdate: UIView! func updateUI() { viewToUpdate.backgroundColor = .red } } class ShinyNewAsyncAwaitClass { func doAsyncAwaitThing() async { // make network call or something } } class OtherClassThatICantUpdateToAsyncAwaitYet { func doOldClosureBasedThing(completion: @escaping…