UIView Previewing Delegate. Get View Controller For Preview(IUIViewControllerPreviewing, CGPoint) Controller
Previewing Delegate. Get View Controller For Preview(IUIViewControllerPreviewing, CGPoint)
Called when the user performs the 3D Touch "Peek" pressure gesture.
[Foundation.Export("previewingContext:viewControllerForLocation:")] public abstract UIKit.UIViewController GetViewControllerForPreview (UIKit.IUIViewControllerPreviewing previewingContext, CoreGraphics.CGPoint location);
abstract member GetViewControllerForPreview : UIKit.IUIViewControllerPreviewing * CoreGraphics.CGPoint -> UIKit.UIViewController
The context in which the 3D Touch is occurring..
On hardware that supports 3D Touch (see ForceTouchCapability), this method is called when the 3D Touch triggers the "Peek" action.
One feature of 3D Touch is the ability to blur the background except for the element that is the subject of the touch. Application developers control this behavior by to setting the SourceRect to the control that should not be blurred. For instance, in a table, one can prevent the selected cell from blurring by retrieving the cell at the
location at which the 3D Touch is occurring and then setting the SourceRect to the Frame of the cell:
// Obtain the index path and the cell that was pressed. (Checks for null not shown.) var indexPath = TableView.IndexPathForRowAtPoint (location); var cell = TableView.CellAt (indexPath); previewingContext.SourceRect = cell.Frame;