Skip to content

[uikit] Duplicate bindings for 'UIScrollView.ContentOffset' to get correct availability information. Fixes #4893 - #4982

Merged
spouliot merged 1 commit into
dotnet:xcode10.1from
spouliot:gh4893
Oct 15, 2018
Merged

[uikit] Duplicate bindings for 'UIScrollView.ContentOffset' to get correct availability information. Fixes #4893#4982
spouliot merged 1 commit into
dotnet:xcode10.1from
spouliot:gh4893

Conversation

@spouliot

Copy link
Copy Markdown
Contributor

ContentOffset was moved to UIFocusItemScrollableContainer in iOS 12.
Since it's a new protocol it's decorated as introduced in iOS 12 - but
the API was actually already available for a long time.

The trick is to keep the original binding inside UIScrollView
so it overrides the protocol and keeps the correct availability info.
It requires adding new to bindings to avoid compiler warnings.

reference: #4893

…rrect availability information. Fixes dotnet#4893

`ContentOffset` was moved to `UIFocusItemScrollableContainer` in iOS 12.
Since it's a new protocol it's decorated as introduced in iOS 12 - but
the API was actually already available for a long time.

The _trick_ is to keep the original binding inside `UIScrollView`
so it overrides the protocol and keeps the correct availability info.
It requires adding `new` to bindings to avoid compiler warnings.

reference: dotnet#4893
@monojenkins

Copy link
Copy Markdown
Contributor

Build success
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (please review changes)
Test run succeeded

@spouliot
spouliot merged commit 78af341 into dotnet:xcode10.1 Oct 15, 2018
@spouliot
spouliot deleted the gh4893 branch October 15, 2018 12:20
@rolfbjarne

Copy link
Copy Markdown
Member

@monojenkins backport master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants