From e8af36e1055388d03ba2d44ae0c6405d21c54d02 Mon Sep 17 00:00:00 2001 From: Alex Soto Date: Thu, 2 Feb 2017 22:51:22 -0600 Subject: [PATCH] [UIKit] Update for iOS 10.3 beta 1 --- src/UIKit/UIEnums.cs | 16 +++++++++++++++- src/uikit.cs | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/UIKit/UIEnums.cs b/src/UIKit/UIEnums.cs index d2cde8242f0a..b0af379de933 100644 --- a/src/UIKit/UIEnums.cs +++ b/src/UIKit/UIEnums.cs @@ -991,7 +991,14 @@ public enum UIViewAnimationOptions : nuint_compat_int { TransitionCurlDown = 4 << 20, TransitionCrossDissolve = 5 << 20, TransitionFlipFromTop = 6 << 20, - TransitionFlipFromBottom = 7 << 20 + TransitionFlipFromBottom = 7 << 20, + + [iOS (10,3)] + PreferredFramesPerSecondDefault = 0 << 24, + [iOS (10,3)] + PreferredFramesPerSecond60 = 3 << 24, + [iOS (10,3)] + PreferredFramesPerSecond30 = 7 << 24, } #if !WATCH @@ -1973,4 +1980,11 @@ public enum UITextFieldDidEndEditingReason : nint { [NoiOS] Cancelled } + + [iOS (10,3), TV (10,2), NoWatch] + [Native] + public enum UIScrollViewIndexDisplayMode : nint { + Automatic, + AlwaysHidden + } } diff --git a/src/uikit.cs b/src/uikit.cs index 4e004ec45be2..8f7e353fae73 100644 --- a/src/uikit.cs +++ b/src/uikit.cs @@ -2951,6 +2951,23 @@ interface UIApplication { [NullAllowed, Export ("shortcutItems", ArgumentSemantic.Copy)] UIApplicationShortcutItem[] ShortcutItems { get; set; } + // + // 10.0 + // + // from @interface UIApplication (UIAlternateApplicationIcons) + + [iOS (10,3)][TV (10,2)] + [Export ("supportsAlternateIcons")] + bool SupportsAlternateIcons { get; } + + [iOS (10,3)][TV (10,2)] + [Async] + [Export ("setAlternateIconName:completionHandler:")] + void SetAlternateIconName ([NullAllowed] string alternateIconName, [NullAllowed] Action completionHandler); + + [iOS (10,3)][TV (10,2)] + [Export ("alternateIconName"), NullAllowed] + string AlternateIconName { get; } } [NoTV] @@ -3914,6 +3931,16 @@ interface UICollectionViewDataSource { [iOS (9,0)] [Export ("collectionView:moveItemAtIndexPath:toIndexPath:")] void MoveItem (UICollectionView collectionView, NSIndexPath sourceIndexPath, NSIndexPath destinationIndexPath); + + [iOS (10,3), TV (10,2)] + [return: NullAllowed] + [Export ("indexTitlesForCollectionView:")] + string [] GetIndexTitles (UICollectionView collectionView); + + [iOS (10,3), TV (10,2)] + [return: NullAllowed] + [Export ("collectionView:indexPathForIndexTitle:atIndex:")] + NSIndexPath GetIndexPath (UICollectionView collectionView, string title, nint atIndex); } [Since (6,0)] @@ -9386,6 +9413,10 @@ UIScreenMode CurrentMode { [Export ("displayLinkWithTarget:selector:")] CoreAnimation.CADisplayLink CreateDisplayLink (NSObject target, Selector sel); + [iOS (10,3), TV (10,2)] + [Export ("maximumFramesPerSecond")] + nint MaximumFramesPerSecond { get; } + [NoTV] [Since (5,0)] [Export ("brightness")] @@ -9500,6 +9531,10 @@ interface UIScrollView { [Export ("decelerationRate")] nfloat DecelerationRate { get; set; } + [iOS (10,3), TV (10,2), NoWatch] + [Export ("indexDisplayMode")] + UIScrollViewIndexDisplayMode IndexDisplayMode { get; set; } + [NoTV] [Export ("pagingEnabled")] bool PagingEnabled { [Bind ("isPagingEnabled")] get; set; } @@ -11133,10 +11168,11 @@ interface UITableViewSource { [Export ("tableView:canMoveRowAtIndexPath:")] bool CanMoveRow (UITableView tableView, NSIndexPath indexPath); - [NoTV] + [TV (10,2)] [Export ("sectionIndexTitlesForTableView:")] string [] SectionIndexTitles (UITableView tableView); + [TV (10,2)] // <- Header removed __TVOS_PROHIBITED; [Export ("tableView:sectionForSectionIndexTitle:atIndex:")] nint SectionFor (UITableView tableView, string title, nint atIndex);