1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-08 22:56:41 +01:00
mastodon-app-ufficiale-ipho.../MastodonSDK/Sources/MastodonUI/Extension/AXCustomContent.swift

22 lines
522 B
Swift
Raw Normal View History

// Copyright © 2023 Mastodon gGmbH. All rights reserved.
import Accessibility
extension AXCustomContent {
convenience init?(label: String, value: String?) {
if let value, !value.isEmpty {
self.init(label: label, value: value)
} else {
return nil
}
}
convenience init?(label: String, value: (some BinaryInteger)?) {
if let value {
self.init(label: label, value: value.formatted())
} else {
return nil
}
}
}