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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed a performance issue caused by month headers recalculating their size too often
- Fixed a performance issue caused by the item models for day ranges and month backgrounds not being cached
- Fixed an issue that could cause the calendar to appear blank after rotating the device
- Fixed an issue with touch handling on iOS 26

### Changed
- Rewrote accessibility code to avoid posting notifications, which causes poor Voice Over performance and odd focus bugs
Expand Down
10 changes: 9 additions & 1 deletion Sources/Public/ItemViews/SwiftUIWrapperView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,21 @@ public final class SwiftUIWrapperView<Content: View>: UIView {

public override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
// `_UIHostingView`'s `isUserInteractionEnabled` is not affected by the `allowsHitTesting`
// modifier. Its first subview's `isUserInteractionEnabled` _does_ appear to be affected by the
// modifier.
// Prior to iOS 26, the first subview `isUserInteractionEnabled` _does_ appear to be affected by the
// `allowsHitTesting` modifier, enabling us to properly ignore touch handling.
// Starting with iOS 26, we can check the first sublayer's `allowHitTesting` property.
if
let firstSubview = hostingControllerView.subviews.first,
!firstSubview.isUserInteractionEnabled
{
return false
} else if
let firstSublayer = hostingControllerView.layer.sublayers?.first,
let allowsHitTesting = firstSublayer.value(forKey: "allowsHitTesting") as? Bool,
!allowsHitTesting
{
return false
} else {
return super.point(inside: point, with: event)
}
Expand Down