skip to Main Content

SwiftUI: use 'accessibilityIdentifier' only on iOS 14+ – Ios swift

Given the following code: struct CopyButtonStyle: ButtonStyle { init() {} func makeBody(configuration: Configuration) -> some View { let copyIconSize: CGFloat = 24 return Image(systemName: "doc.on.doc") .renderingMode(.template) .resizable() .frame(width: copyIconSize, height: copyIconSize) .accessibilityIdentifier("copy_button") .opacity(configuration.isPressed ? 0.5 : 1) } } I'm…

VIEW QUESTION
Back To Top
Search