We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db6bc9d commit b512aeaCopy full SHA for b512aea
Sources/UIKitNavigation/Navigation/UIAlertController.swift
@@ -37,7 +37,17 @@
37
handler: @escaping (_ action: Action?) -> Void = { (_: Never?) in }
38
) {
39
self.init(
40
- title: state.titleVisibility == .visible ? String(state: state.title) : nil,
+ title: {
41
+ switch state.titleVisibility {
42
+ case .automatic:
43
+ let title = String(state: state.title)
44
+ return title.isEmpty ? nil : title
45
+ case .hidden:
46
+ return nil
47
+ case .visible:
48
+ return String(state: state.title)
49
+ }
50
+ }(),
51
message: state.message.map { String(state: $0) },
52
preferredStyle: .actionSheet
53
)
0 commit comments