KEMBAR78
[iOS] Fix AdaptiveTrigger not working as expected by jsuarezruiz · Pull Request #20987 · dotnet/maui · GitHub
Skip to content

Conversation

jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Mar 4, 2024

Description of Change

Fix AdaptiveTrigger not working as expected on iOS. The main change is that the Window on iOS did not receive change updates. When rotating the device for example without resizing the window, the AdaptiveTrigger did not work as expected.

The previous implementation was incorrect in that the frame was only updated when using scenes. However, most apps do not and this was not detected because all the maui samples use scenes. The new implementations uses a KVO on the UIWindow to update the maui window. In addition to this now working generally, the WindowSceneDidUpdateCoordinateSpace event would fire for many other things - such as window activation - so we now get slightly better performance.

Javier added code to use KVO to watch frame but I (Matthew) think it will leak the things, so I (Matthew) wrapped it in a proxy object as we seem to have been doing for anything that needs to listen to platform view changes/events.

fix-19197

Issues Fixed

Fixes #19197

@jsuarezruiz jsuarezruiz added t/bug Something isn't working area-xaml XAML, CSS, Triggers, Behaviors platform/ios area-controls-window Window labels Mar 4, 2024
@jsuarezruiz jsuarezruiz requested a review from a team as a code owner March 4, 2024 12:24
@Dokug
Copy link

Dokug commented Jun 9, 2024

Are there any updates on this?

@samhouts samhouts added the stale Indicates a stale issue/pr and will be closed soon label Aug 29, 2024
@Dokug
Copy link

Dokug commented Nov 13, 2024

Anything new on this after MAUI's net 9 release?

@mattleibow
Copy link
Member

/rebase

@jsuarezruiz jsuarezruiz reopened this Mar 19, 2025
@jsuarezruiz jsuarezruiz removed the stale Indicates a stale issue/pr and will be closed soon label Mar 24, 2025
@PureWeen PureWeen changed the base branch from main to inflight/current June 6, 2025 15:36
@PureWeen PureWeen merged commit 2bf6b36 into inflight/current Jun 6, 2025
128 checks passed
@PureWeen PureWeen deleted the fix-19197 branch June 6, 2025 15:37
github-actions bot pushed a commit that referenced this pull request Jun 7, 2025
* Added changes

* Fixed broken test

* Updated test
github-actions bot pushed a commit that referenced this pull request Jun 10, 2025
* Added changes

* Fixed broken test

* Updated test
github-actions bot pushed a commit that referenced this pull request Jun 10, 2025
* Added changes

* Fixed broken test

* Updated test
github-actions bot pushed a commit that referenced this pull request Jun 11, 2025
* Added changes

* Fixed broken test

* Updated test
github-actions bot pushed a commit that referenced this pull request Jun 11, 2025
* Added changes

* Fixed broken test

* Updated test
github-actions bot pushed a commit that referenced this pull request Jun 16, 2025
* Added changes

* Fixed broken test

* Updated test
github-actions bot pushed a commit that referenced this pull request Jun 16, 2025
* Added changes

* Fixed broken test

* Updated test
github-actions bot pushed a commit that referenced this pull request Jun 19, 2025
* Added changes

* Fixed broken test

* Updated test
PureWeen added a commit that referenced this pull request Jun 21, 2025
For more information about inflight process check
https://github.com/dotnet/maui/wiki/Inflight-Branch-Process

# .NET MAUI Release Notes - inflight/candidate Branch

## MAUI Product Fixes
* [iOS] Fix SwipeView programmatic open when background color is set by
@Shalini-Ashokan in #29765
* [iOS] FormattedText with text color causes stack overflow - fix by
@kubaflo in #29874
* [iOS] Fix AdaptiveTrigger not working as expected by @jsuarezruiz in
#20987
* [iOS] Fix for Flyout title is not broken over multiple lines when you
rotate your screen by @BagavathiPerumal in
#29171
* [Windows] Fix for Assigning null to the SelectedItem of the
CollectionView in the SelectionChanged event does not clear the
selection by @SyedAbdulAzeemSF4852 in
#29288
* Fix TapCoordinates method in Catalyst by @jsuarezruiz in
#29775
* Fixed ItemSpacing on CarouselView resizes items [Android] by
@Dhivya-SF4094 in #29796
* Perf : ButtonContentTypeConverter now using InvariantCulture to parse
double by @antoine-jonathan in #25393
* ToolbarItem behavior with ImageSource iOS - fix by @kubaflo in
#28833
* [Android] Fixed Button Shadow Color Transparency Not Applied Correctly
by @NanthiniMahalingam in #29371
* Don't call NSAttributedString with HTML from a background thread by
@kubaflo in #26153
* [Windows] Implemented the Resize and Downsize functions in the
W2DImage class by @HarishwaranVijayakumar in
#29138
* Templated indicator view - improvements by @kubaflo in
#25642
* Update Issue25946.xaml by @anandhan-rajagopal in
#30025

## Testing
* Fixed Test case failure in PR 26153 - iOS by @kubaflo in
#29906
* Fixed Test case failure in PR 25642 - snapshots by @kubaflo in
#29881
* [Testing] Feature Matrix UITest Cases for RadioButton by
@TamilarasanSF4853 in #29744
* [Testing] Feature Matrix UITest Cases for CollectionView ItemsSource
Feature by @LogishaSelvarajSF4525 in
#29322
* [Testing] Feature Matrix UITest Cases for Stepper by
@nivetha-nagalingam in #29731
* [Testing] Feature Matrix UITest Cases for CheckBox Control by
@anandhan-rajagopal in #29739
* Update the comment for the test properties by @mattleibow in
#27306

## Dependency Updates
* No changes in this category

## Docs
* No changes in this category

## Housekeeping
* [create-pull-request] automated change by @github-actions[bot] in
#29875
* [create-pull-request] automated change by @github-actions[bot] in
#29792
* [create-pull-request] automated change by @github-actions[bot] in
#29760

**Full Changelog**:
origin/main...origin/inflight/candidate
@PureWeen PureWeen added this to the .NET 9 SR9 milestone Jun 23, 2025
rmarinho pushed a commit that referenced this pull request Jun 24, 2025
* Added changes

* Fixed broken test

* Updated test
@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-window Window area-xaml XAML, CSS, Triggers, Behaviors platform/ios t/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[regression/8.0.3] AdaptiveTrigger does not work

6 participants