swift5 Questions
2
When I publish a Swift Package, I like to include some Playgrounds to show examples of how to use the package. Prior to Swift 5.4, I was able to do this in a relatively straightforward way, but now...
Caldron asked 13/6, 2021 at 1:49
1
I try to check the actor's behavior. This is a new feature provided by Swift5.5.
I've created a playground with an example code from the official documentation swift.org:
import Foundation
acto...
Incipient asked 13/6, 2021 at 10:0
1
Solved
Does anyone know, in the new Swift async/await stuff, is there any difference between TaskGroup async and spawn, or are they pure synonyms? (If they are synonyms, I rather like spawn better. async ...
Interrogation asked 15/6, 2021 at 4:22
1
Solved
I recently saw that Swift had introduced concurrency support with the Actor model in Swift 5.5. This model enables safe concurrent code to avoid data races when we have a shared, mutable state.
I w...
Coprolite asked 8/6, 2021 at 19:23
1
I encountered a weird behavior. The best way I can put it is … Not overridden protocol methods in a class extension are not called while the superclass already conforms to the protocol (via extensi...
Flipflop asked 18/6, 2019 at 9:16
5
I want to set an image in the titleView of NavigationBar in SwiftUI, as we do in UIKit
navigationItem.titleView = UIImageView(image: UIImage(named: "logo"))
this is how we do it in UIKit.
anyon...
Tyrannicide asked 22/10, 2019 at 11:32
4
I hope you all are safe.
I know this question asked several times but not getting a perfect answer.
I just wanted to capture an image from UIView with high resolution the main this is that image ...
Orran asked 21/5, 2020 at 19:56
3
There doesn't seem to be an intuitive way of moving a view/shape along a custom path, particularly a curvy path. I've found several libraries for UIKit that allow views to move on a Bézier Paths (D...
4
I have a problem getting the current UIScene when multiple scenes are connected.
Specifically, my app (iOS 13) supports multiple windows on the iPad. When I have two windows side by side and I ac...
1
I need to use two classes with the same name in swift 5. For this, I have created those two classes in two different modules, but I am confused on how to use both the classes in an UIViewController...
2
In Swift 5 Apple introduced Result type. It's generic enum with two cases:
public enum Result<Success, Failure: Error> {
case success(Success), failure(Failure)
}
Personally I used to two...
5
Solved
I want a @Published variable to be persisted, so that it's the same every time when I relaunch my app.
I want to use both the @UserDefault and @Published property wrappers on one variable. For ex...
1
Solved
I create offer codes on my iTunes account in my monthly subscription.
I am using presentCodeRedemptionSheet StoreKit API to enter redeem code within the app using this
code
let paymentQueue = SKPa...
Kathikathiawar asked 19/2, 2021 at 8:30
6
Solved
I attach the video of my issue. When i click on anywhere in viewcontroller navigation bar is appear
override func viewWillAppear(_ animated: Bool) {
self.navigationController?.setNavigationBarHid...
Locke asked 25/1, 2020 at 8:19
3
Solved
Carthage File contents:
github "SwiftyJSON/SwiftyJSON"
Error:
Build Failed
Task failed with exit code 1:
/usr/bin/xcrun lipo -create /Users/samrezikram/Library/Caches/org.carthage.Cartha...
Misdemean asked 20/9, 2020 at 10:44
2
Solved
I have a VStack with image and a text, I need to make it clickable so I can show and alert to the user. I have tried onTapGesture method but I'm able to print the statement but alert is not showing...
0
I have an iOS point cloud app and am trying to allow the user to keep adding points to an existing point cloud across multiple sessions.
I have a Metal MTKView, overlaid and aligned with an ARView ...
Fronde asked 8/2, 2021 at 17:53
0
My iOS project is split up in several SPM modules. Now I would like to distribute some of them as .xcframework.
Is there a way to automatically create .xcframeworks out of the SPM modules? Or some ...
Hoedown asked 2/2, 2021 at 20:55
1
How to detect if the user has granted the local network permission in the app for iOS 14? I have to show an error screen if the user has denied permission and redirects to os settings to grant perm...
1
Solved
In UIKit you can do something like this:
UIView.animate(withDuration: TimeInterval, animations: {
//animation
}) { (Bool) in
//code which will be executed after the animation
}
Is there anythin...
2
How to calculate the distance between two iOS devices using a wireless connection.
I figure out we can calculate using BLE, using RSSI number.
But the range of the device varies and the device p...
Treasury asked 9/6, 2020 at 13:30
1
I'm using Xcode 12 and I'm trying to adding Universal Type Identifier icon for export and import process.
So I have tried below ways for creating the icon.
added .png file to shared folder.
create...
2
What I want to do is:
VC1 -> present VC2 -> push VC3
this is the normal flow I want to make.
after that on back button(on each VC have back button)
I required to show user as moving back:
VC3 ...
1
Solved
I'm currently developing an application using SwiftUI.
I'm trying to make a timer app and I want to control Timer.publish() method, so I made methods to start and stop the timer.
But I don't know h...
0
Considering user privacy I would like to implement a Limited Library Picker (introduced with iOS 14). Our app handles condition assessment of technical components by allowing the user to attach exa...
© 2022 - 2024 — McMap. All rights reserved.