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

`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: https://github.com/xamarin/xamarin-macios/issues/4893
This commit is contained in:
Sebastien Pouliot 2018-10-15 08:20:52 -04:00 коммит произвёл GitHub
Родитель 31ed3422ff
Коммит 78af341ca4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -10040,6 +10040,10 @@ namespace UIKit {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
// moved to UIFocusItemScrollableContainer in iOS 12 - but that makes the availability information incorrect (so `new` is used to avoid compiler warnings)
[Export ("contentOffset")]
new CGPoint ContentOffset { get; set; }
[Export ("contentSize")]
new CGSize ContentSize { get; set; }