Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Examples/Sources/CounterExample/CounterApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ struct CounterApp: App {
count -= 1
}
Text("Count: \(count)")
.overlay {
GeometryReader { proxy in
Color.blue.opacity(0.5)
}
}
Button("+") {
count += 1
}
Expand Down
1 change: 1 addition & 0 deletions Sources/UIKitBackend/UIKitBackend+Passive.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@

textContainer = NSTextContainer(size: frame.size)
textContainer.lineBreakMode = .byTruncatingTail
textContainer.lineFragmentPadding = 0
layoutManager.addTextContainer(textContainer)

super.init(frame: frame)
Expand Down Expand Up @@ -181,7 +182,7 @@
window?.endEditing(true)
guard becomeFirstResponder() else { return }

let menu = UIMenuController.shared

Check warning on line 185 in Sources/UIKitBackend/UIKitBackend+Passive.swift

View workflow job for this annotation

GitHub Actions / uikit (Vision)

'UIMenuController' was deprecated in visionOS 1.0: UIMenuController is deprecated. Use UIEditMenuInteraction instead.

Check warning on line 185 in Sources/UIKitBackend/UIKitBackend+Passive.swift

View workflow job for this annotation

GitHub Actions / uikit (Vision)

'UIMenuController' was deprecated in visionOS 1.0: UIMenuController is deprecated. Use UIEditMenuInteraction instead.
if !menu.isMenuVisible {
menu.showMenu(from: self, rect: bounds)
}
Expand All @@ -194,7 +195,7 @@

private func cancelSelection() {
#if !os(tvOS)
let menu = UIMenuController.shared

Check warning on line 198 in Sources/UIKitBackend/UIKitBackend+Passive.swift

View workflow job for this annotation

GitHub Actions / uikit (Vision)

'UIMenuController' was deprecated in visionOS 1.0: UIMenuController is deprecated. Use UIEditMenuInteraction instead.

Check warning on line 198 in Sources/UIKitBackend/UIKitBackend+Passive.swift

View workflow job for this annotation

GitHub Actions / uikit (Vision)

'UIMenuController' was deprecated in visionOS 1.0: UIMenuController is deprecated. Use UIEditMenuInteraction instead.
menu.hideMenu(from: self)
#endif
}
Expand Down
Loading