Post

Replies

Boosts

Views

Activity

How to code, in SwiftUI, for Notifications
I need to code differently when Voice Over is on. I found this: UIAccessibility.voiceOverStatusDidChangeNotification Notification coding is unknown to me. I need the Notification to change my variable "accessibilityIsOn: Bool" as Voice Over changes. I've been reading google and learned that I do not need Notifications; What I need is the way to detect if the user is using Voice Over. More reading revels this: isVoiceOverRunning So I will read how to use it.
2
0
2.0k
Dec ’20
Is there a way to detect in SwiftUI when Accessibilities Voice Over is on?
I need to know when Accessibility Voice Over is on because I want to "unEnable" the modifier.onTapGesture{} which interferes with the Accessibility gestures. My whole screen is filled with buttons and textfields that respond to touch and my code is confused when Voice Over is on. I Found: UIAccessibility.voiceOverStatusDidChangeNotification but I need to see a sample how to use it! I've not coded Notifications before. I've been reading google search and I do not need Notifications. Just a simple way to set a variable true or false depending on Voice Over is on. more reading revels this: isVoiceOverRunning so, I will read how to use it...
1
0
2.6k
Dec ’20
How to code NSDocuments data() function?
I need to see a sample code in order for me to understand. I am learning about NSDocuments, having created the starting template from Xcode. My Document consists of an Integer and the storyboard has a field to display and a button to increment the value. I need to learn how to store and read my Document data, a single Integer. This is what Xcode gives me: var myData: Int = 0 //my Document's Data. override func data(ofType typeName: String) throws -> Data { throw NSError(domain: NSOSStatusErrorDomain, code: unimpErr, userInfo: nil) } override func read(from data: Data, ofType typeName: String) throws { throw NSError(domain: NSOSStatusErrorDomain, code: unimpErr, userInfo: nil) }ive tied a few guesses but am completely lost; help me please.
2
0
456
Apr ’20