Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
355 lines (354 sloc) 20.8 KB
<Type Name="UILongPressGestureRecognizer" FullName="UIKit.UILongPressGestureRecognizer">
<TypeSignature Language="C#" Value="public class UILongPressGestureRecognizer : UIKit.UIGestureRecognizer" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit UILongPressGestureRecognizer extends UIKit.UIGestureRecognizer" />
<TypeSignature Language="DocId" Value="T:UIKit.UILongPressGestureRecognizer" />
<TypeSignature Language="F#" Value="type UILongPressGestureRecognizer = class&#xA; inherit UIGestureRecognizer" />
<AssemblyInfo>
<AssemblyName>Xamarin.iOS</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>UIKit.UIGestureRecognizer</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>Foundation.Register("UILongPressGestureRecognizer", true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Gesture recognizer for long presses.</summary>
<remarks>
<para>The long press gesture involves one or more (see <see cref="P:UIKit.UILongPressGestureRecognizer.NumberOfTouchesRequired" />) fingers to to press for a certain amount of time (see <see cref="P:UIKit.UILongPressGestureRecognizer.MinimumPressDuration" />). The fingers may not move more than <see cref="P:UIKit.UILongPressGestureRecognizer.AllowableMovement" />.</para>
</remarks>
<related type="sample" href="https://github.com/xamarin/ios-samples/tree/master/Touches_GestureRecognizers/">Touches_Classic</related>
<related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UILongPressGestureRecognizer_Class/index.html">Apple documentation for <c>UILongPressGestureRecognizer</c></related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UILongPressGestureRecognizer ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:UIKit.UILongPressGestureRecognizer.#ctor" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>Foundation.Export("init")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Default constructor that initializes a new instance of this class with no parameters.</summary>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected UILongPressGestureRecognizer (Foundation.NSObjectFlag t);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(class Foundation.NSObjectFlag t) cil managed" />
<MemberSignature Language="DocId" Value="M:UIKit.UILongPressGestureRecognizer.#ctor(Foundation.NSObjectFlag)" />
<MemberSignature Language="F#" Value="new UIKit.UILongPressGestureRecognizer : Foundation.NSObjectFlag -&gt; UIKit.UILongPressGestureRecognizer" Usage="new UIKit.UILongPressGestureRecognizer t" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="t" Type="Foundation.NSObjectFlag" />
</Parameters>
<Docs>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<remarks>
<para>This constructor should be called by derived classes when they completely construct the object in managed code and merely want the runtime to allocate and initialize the NSObject. This is required to implement the two-step initialization process that Objective-C uses, the first step is to perform the object allocation, the second step is to initialize the object. When developers invoke the constructor that takes the NSObjectFlag.Empty they take advantage of a direct path that goes all the way up to NSObject to merely allocate the object's memory and bind the Objective-C and C# objects together. The actual initialization of the object is up to the developer.</para>
<para>This constructor is typically used by the binding generator to allocate the object, but prevent the actual initialization to take place. Once the allocation has taken place, the constructor has to initialize the object. With constructors generated by the binding generator this means that it manually invokes one of the "init" methods to initialize the object.</para>
<para>It is the developer's responsibility to completely initialize the object if they chain up using the NSObjectFlag.Empty path.</para>
<para>In general, if the developer's constructor invokes the NSObjectFlag.Empty base implementation, then it should be calling an Objective-C init method. If this is not the case, developers should instead chain to the proper constructor in their class. </para>
<para>The argument value is ignored and merely ensures that the only code that is executed is the construction phase is the basic NSObject allocation and runtime type registration. Typically the chaining would look like this:</para>
<example>
<code lang="csharp lang-csharp"><![CDATA[
//
// The NSObjectFlag merely allocates the object and registers the
// C# class with the Objective-C runtime if necessary, but no actual
// initXxx method is invoked, that is done later in the constructor
//
// This is taken from Xamarin.iOS's source code:
//
[Export ("initWithFrame:")]
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
{
// Invoke the init method now.
var initWithFrame = new Selector ("initWithFrame:").Handle;
if (IsDirectBinding)
Handle = ObjCRuntime.Messaging.IntPtr_objc_msgSend_CGRect (this.Handle, initWithFrame, frame);
else
Handle = ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_CGRect (this.SuperHandle, initWithFrame, frame);
}
]]></code>
</example>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UILongPressGestureRecognizer (Action action);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Action action) cil managed" />
<MemberSignature Language="DocId" Value="M:UIKit.UILongPressGestureRecognizer.#ctor(System.Action)" />
<MemberSignature Language="F#" Value="new UIKit.UILongPressGestureRecognizer : Action -&gt; UIKit.UILongPressGestureRecognizer" Usage="new UIKit.UILongPressGestureRecognizer action" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<Parameters>
<Parameter Name="action" Type="System.Action" />
</Parameters>
<Docs>
<param name="action">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UILongPressGestureRecognizer (Action&lt;UIKit.UILongPressGestureRecognizer&gt; action);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Action`1&lt;class UIKit.UILongPressGestureRecognizer&gt; action) cil managed" />
<MemberSignature Language="DocId" Value="M:UIKit.UILongPressGestureRecognizer.#ctor(System.Action{UIKit.UILongPressGestureRecognizer})" />
<MemberSignature Language="F#" Value="new UIKit.UILongPressGestureRecognizer : Action&lt;UIKit.UILongPressGestureRecognizer&gt; -&gt; UIKit.UILongPressGestureRecognizer" Usage="new UIKit.UILongPressGestureRecognizer action" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<Parameters>
<Parameter Name="action" Type="System.Action&lt;UIKit.UILongPressGestureRecognizer&gt;" />
</Parameters>
<Docs>
<param name="action">Code to invoke when the gesture is recognized.</param>
<summary>Constructs a gesture recognizer and provides a method to invoke when the gesture is recognized.</summary>
<remarks>This overload allows the method that will be invoked to receive the recognizer that detected the gesture as a parameter.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected internal UILongPressGestureRecognizer (IntPtr handle);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig specialname rtspecialname instance void .ctor(native int handle) cil managed" />
<MemberSignature Language="DocId" Value="M:UIKit.UILongPressGestureRecognizer.#ctor(System.IntPtr)" />
<MemberSignature Language="F#" Value="new UIKit.UILongPressGestureRecognizer : nativeint -&gt; UIKit.UILongPressGestureRecognizer" Usage="new UIKit.UILongPressGestureRecognizer handle" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="handle" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="handle">Pointer (handle) to the unmanaged object.</param>
<summary>A constructor used when creating managed representations of unmanaged objects; Called by the runtime.</summary>
<remarks>
<para>This constructor is invoked by the runtime infrastructure (<see cref="M:ObjCRuntime.Runtime.GetNSObject(System.IntPtr)" />) to create a new managed representation for a pointer to an unmanaged Objective-C object. Developers should not invoke this method directly, instead they should call the GetNSObject method as it will prevent two instances of a managed object to point to the same native object.</para>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UILongPressGestureRecognizer (Foundation.NSObject target, ObjCRuntime.Selector action);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class Foundation.NSObject target, class ObjCRuntime.Selector action) cil managed" />
<MemberSignature Language="DocId" Value="M:UIKit.UILongPressGestureRecognizer.#ctor(Foundation.NSObject,ObjCRuntime.Selector)" />
<MemberSignature Language="F#" Value="new UIKit.UILongPressGestureRecognizer : Foundation.NSObject * ObjCRuntime.Selector -&gt; UIKit.UILongPressGestureRecognizer" Usage="new UIKit.UILongPressGestureRecognizer (target, action)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>Foundation.Export("initWithTarget:action:")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="target" Type="Foundation.NSObject" />
<Parameter Name="action" Type="ObjCRuntime.Selector" />
</Parameters>
<Docs>
<param name="target">To be added.</param>
<param name="action">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AllowableMovement">
<MemberSignature Language="C#" Value="public virtual nfloat AllowableMovement { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.nfloat AllowableMovement" />
<MemberSignature Language="DocId" Value="P:UIKit.UILongPressGestureRecognizer.AllowableMovement" />
<MemberSignature Language="F#" Value="member this.AllowableMovement : nfloat with get, set" Usage="UIKit.UILongPressGestureRecognizer.AllowableMovement" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>get: Foundation.Export("allowableMovement")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>set: Foundation.Export("setAllowableMovement:")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.nfloat</ReturnType>
</ReturnValue>
<Docs>
<summary>The maximum movement, in points, of the fingers before the gesture fails.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ClassHandle">
<MemberSignature Language="C#" Value="public override IntPtr ClassHandle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance native int ClassHandle" />
<MemberSignature Language="DocId" Value="P:UIKit.UILongPressGestureRecognizer.ClassHandle" />
<MemberSignature Language="F#" Value="member this.ClassHandle : nativeint" Usage="UIKit.UILongPressGestureRecognizer.ClassHandle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Docs>
<summary>The handle for this class.</summary>
<value>The pointer to the Objective-C class.</value>
<remarks>Each Xamarin.iOS class mirrors an unmanaged Objective-C class. This value contains the pointer to the Objective-C class, it is similar to calling objc_getClass with the object name.</remarks>
</Docs>
</Member>
<Member MemberName="MinimumPressDuration">
<MemberSignature Language="C#" Value="public virtual double MinimumPressDuration { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance float64 MinimumPressDuration" />
<MemberSignature Language="DocId" Value="P:UIKit.UILongPressGestureRecognizer.MinimumPressDuration" />
<MemberSignature Language="F#" Value="member this.MinimumPressDuration : double with get, set" Usage="UIKit.UILongPressGestureRecognizer.MinimumPressDuration" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>get: Foundation.Export("minimumPressDuration")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>set: Foundation.Export("setMinimumPressDuration:")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Docs>
<summary>The minimum time, in seconds, fingers must press for the gesture to be recognized. Default is 0.5.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="NumberOfTapsRequired">
<MemberSignature Language="C#" Value="public virtual nint NumberOfTapsRequired { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.nint NumberOfTapsRequired" />
<MemberSignature Language="DocId" Value="P:UIKit.UILongPressGestureRecognizer.NumberOfTapsRequired" />
<MemberSignature Language="F#" Value="member this.NumberOfTapsRequired : nint with get, set" Usage="UIKit.UILongPressGestureRecognizer.NumberOfTapsRequired" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>get: Foundation.Export("numberOfTapsRequired")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>set: Foundation.Export("setNumberOfTapsRequired:")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.nint</ReturnType>
</ReturnValue>
<Docs>
<summary>The number of taps in the view required for the gesture to be recognized. Default is 0.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="NumberOfTouchesRequired">
<MemberSignature Language="C#" Value="public virtual nuint NumberOfTouchesRequired { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.nuint NumberOfTouchesRequired" />
<MemberSignature Language="DocId" Value="P:UIKit.UILongPressGestureRecognizer.NumberOfTouchesRequired" />
<MemberSignature Language="F#" Value="member this.NumberOfTouchesRequired : nuint with get, set" Usage="UIKit.UILongPressGestureRecognizer.NumberOfTouchesRequired" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>get: Foundation.Export("numberOfTouchesRequired")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>get: ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>set: Foundation.Export("setNumberOfTouchesRequired:")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>set: ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.nuint</ReturnType>
</ReturnValue>
<Docs>
<summary>The number of fingers that must touch the view for the gesture to be recognized. Default is 1.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.