Is there a way to apply color filters to the contents of a PDF displayed in a PDFView? My desired effect is to display the PDF with colors inverted. CIFilter and compositingFilter seem relevant, but I couldn't get to a working example. Any guidance appreciated!
Post
Replies
Boosts
Views
Activity
I'm trying to update my SwiftUI view when system volume changes. Ultimately, my use case is to display a low volume warning overlay when the system volume is low. Right now, though, let's say I'm just trying to show the current volume in a Text label. I've tried using onReceive with a publisher on AVAudioSession.sharedInstance().outputVolume, as in below, but my onReceive block only fires once when the view appears, and is not called when the volume subsequently changes. Why does the below not work, and what is the best way to update SwiftUI views when volume changes?
struct Test: View {
@State var volume: Float = 0
var body: some View {
Text("current volume is \(volume)")
.onReceive(AVAudioSession.sharedInstance().publisher(for: \.outputVolume), perform: { value in
self.volume = value
})
}
}
Thanks!
I have generated a ECSECPrimeRandom key in the Secure Enclave that I use to encrypt and decrypt data (mainly strings) using the eciesEncryptionCofactorX963SHA256AESGCM algorithm.
I have specified the access control on this key to be
[.privateKeyUsage, .userPresence]
since I want to authenticate the user before using the private key.
The problem is that I sometimes want to "bulk" decrypt multiple encrypted Data items at once using this key. Under the current implementation, though, if I have n strings to decrypt at once, the user is prompted for authentication n times, which is quite cumbersome.
Is there a method I can use like SecKeyCreateDecryptedData, but for bulk decryption? Or is there a way I could tweak to .userPresence option to add some a few seconds of grace period so that the user is only prompted once for authentication?
I'm trying to implement a iOS app and an extension with AutoFill provider capability.
Under my project's "Add Capability" section in Xcode, however, AutoFill Credential Provider is not listed.
I'm not currently enrolled in Apple's Developer Program. Is this an Advanced App Capability that I have to enroll to access? This feature is not listed under Apple's list of Advanced App Capabilities - https://developer.apple.com/support/app-capabilities/...