ShinobiControls Xamarin Bindings Documentation

ShinobiEssentials : Shinobi.Essentials Namespace

SEssentialsPullToAction Class

The SEssentialsPullToAction control attaches to a scrollview, or any class which is a sub-class of UIScrollView.

Syntax

[Foundation.Register("SEssentialsPullToAction", true)]
public class SEssentialsPullToAction : UIKit.UIView

Remarks

When the user pulls down the scroll view, the Pull to Action control is displayed. If the user pulls down the scroll view past a certain threshold, an action is triggered by the Pull to Action control.

You can configure the look and feel of the control in a few ways. The control is provided with default behavior, where the control is displayed at the top of the scroll view. By default, the control status view will slide out aligned to the bottom of the control (SEssentialsPullToActionStatusViewAlignment.Bottom), unless a different StatusViewAlignment is specified. If you wish to tweak this default view, you can do this using the SEssentialsPullToAction.Style property on the control. If you wish to display your own custom view when the Pull to Action control is displayed, you can set the SEssentialsPullToAction.StatusView property on the control. If you do this, then modifying the SEssentialsPullToAction.Style property will no longer have any effect.

If the default visualization behavior of the control doesn't meet your needs, you can also set the SEssentialsPullToAction.Visualizer property on the control. This allows you to configure exactly what is displayed in the control when it changes state, from being idle, to being pulled, to an action being triggered, and so on. This is advanced behavior, and will require more work on your part.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

Members

See Also: Inherited members from UIKit.UIView.

Public Constructors

Default constructor.
A constructor that initializes the object from the data stored in the unarchiver object.
Create a Pull to Action control, and attach it to the given UIScrollView.
Create a Pull to Action control with the given frame.
Create a Pull to Action control, and attach it to the given UIScrollView.

Protected Constructors

Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects.

Public Properties

[read-only]
override
ClassHandle IntPtr . The handle for this class.
Delegate ISEssentialsPullToActionDelegate . The delegate for the Pull to Action control.
ExecutingHeight nfloat . The height of the Pull to Action control during its executing state.
[read-only]
PulledAmount nfloat . The current distance that the Pull to Action has been pulled down by, in points.
PullThreshold nfloat . The distance at which an action is triggered, once the PulledAmount has exceeded this value.
ScrollView UIKit.UIScrollView . The UIScrollView that the Pull to Action is attached to.
[read-only]
State SEssentialsPullToActionState . The current state of the Pull to Action.
StatusView ISEssentialsPullToActionStatusView . The status view which is displayed when you interact with the Pull to Action control.
Style SEssentialsPullToActionStyle . By default, the control displays a default status view.
Visualizer ISEssentialsPullToActionVisualizer . Handles the visualization of the Pull to Action control.

Public Methods

ActionCompleted ()
The delegate should call this once it has completed its action.
ApplyTheme (SEssentialsTheme)
Updates the style of the component using the specified theme.
ExecuteAction ()
This is an optional method you can use to tell the control to execute its action if a custom visualizer was provided.
ResetToIdle ()
This is an optional method you can use to tell the control that the animation back to the idle state has completed, if a custom visualizer was provided.

Protected Methods

override
Dispose (bool)
Releases unmanaged resources.

Member Details

SEssentialsPullToAction Constructor

Default constructor.

Syntax

[Foundation.Export("init")]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
public SEssentialsPullToAction ()

Remarks

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

SEssentialsPullToAction Constructor

A constructor that initializes the object from the data stored in the unarchiver object.

Syntax

[Foundation.Export("initWithCoder:")]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
public SEssentialsPullToAction (Foundation.NSCoder coder)

Parameters

coder
The unarchiver object

Remarks

This constructor is provided to allow the class to be initialized from an unarchiver (for example, during NIB deserialization).

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

SEssentialsPullToAction Constructor

Constructor to call on derived classes to skip initialization and merely allocate the object.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
protected SEssentialsPullToAction (Foundation.NSObjectFlag t)

Parameters

t
Unused sentinel value

Remarks

You should not invoke this method directly.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

SEssentialsPullToAction Constructor

A constructor used when creating managed representations of unmanaged objects.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
protected SEssentialsPullToAction (IntPtr handle)

Parameters

handle
Handle of the unmanaged object

Remarks

You should not invoke this method directly.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

SEssentialsPullToAction Constructor

Create a Pull to Action control, and attach it to the given UIScrollView.

Syntax

[Foundation.Export("initWithScrollView:")]
public SEssentialsPullToAction (UIKit.UIScrollView scrollView)

Parameters

scrollView
Documentation for this section has not yet been entered.

Remarks

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

SEssentialsPullToAction Constructor

Create a Pull to Action control with the given frame.

Syntax

[Foundation.Export("initWithFrame:statusViewAlignment:")]
public SEssentialsPullToAction (CoreGraphics.CGRect frame, SEssentialsPullToActionStatusViewAlignment statusViewAlignment)

Parameters

frame
Documentation for this section has not yet been entered.
statusViewAlignment
Documentation for this section has not yet been entered.

Remarks

Specify how the Pull to Action control is visualized.

The possible values of statusViewAlignment are:

  • SEssentialsPullToActionStatusViewAlignment.Stretch: The status view of the Pull to Action control stretches to fill the available space outside of the scroll view, keeping the contents of the status view centered.
  • SEssentialsPullToActionStatusViewAlignment.Bottom: The status view of the Pull to Action control remains a constant size. It is anchored to the bottom edge of the control.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

SEssentialsPullToAction Constructor

Create a Pull to Action control, and attach it to the given UIScrollView.

Syntax

[Foundation.Export("initWithScrollView:statusViewAlignment:")]
public SEssentialsPullToAction (UIKit.UIScrollView scrollView, SEssentialsPullToActionStatusViewAlignment statusViewAlignment)

Parameters

scrollView
Documentation for this section has not yet been entered.
statusViewAlignment
Documentation for this section has not yet been entered.

Remarks

Specify how the Pull to Action control is visualized.

The possible values of statusViewAlignment are:

  • SEssentialsPullToActionStatusViewAlignment.Stretch: The status view of the Pull to Action control stretches to fill the available space outside of the scroll view, keeping the contents of the status view centered.
  • SEssentialsPullToActionStatusViewAlignment.Bottom: The status view of the Pull to Action control remains a constant size. It is anchored to the bottom edge of the control.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

ActionCompleted Method

The delegate should call this once it has completed its action.

Syntax

[Foundation.Export("actionCompleted")]
public virtual void ActionCompleted ()

Remarks

This tells the Pull to Action control to retract back to its idle state.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

ApplyTheme Method

Updates the style of the component using the specified theme.

Syntax

[Foundation.Export("applyTheme:")]
public virtual void ApplyTheme (SEssentialsTheme theme)

Parameters

theme
Documentation for this section has not yet been entered.

Remarks

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

ClassHandle Property

The handle for this class.

Syntax

public override IntPtr ClassHandle { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

Delegate Property

The delegate for the Pull to Action control.

Syntax

[get: Foundation.Export("delegate", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
[set: Foundation.Export("setDelegate:", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
public virtual ISEssentialsPullToActionDelegate Delegate { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Will be sent notifications about changes in state, and the triggering of actions.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

Dispose Method

Releases unmanaged resources.

Syntax

protected override void Dispose (bool disposing)

Parameters

disposing
True if called by Dispose, false if called from a finalizer

Remarks

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

ExecuteAction Method

This is an optional method you can use to tell the control to execute its action if a custom visualizer was provided.

Syntax

[Foundation.Export("executeAction")]
public virtual void ExecuteAction ()

Remarks

By default, this is called internally when the control moves into its executing state. If the control state is not SEssentialsPullToActionState.Executing, calling this method will have no effect.

If the Visualizer is set to a custom SEssentialsPullToActionVisualizer, then it will need to call ExecuteAction to make the Pull to Action begin the action and change state. Ideally, this would be in the visualizer's implementation of SEssentialsPullToActionDelegate.TriggeredAction(SEssentialsPullToAction).

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

ExecutingHeight Property

The height of the Pull to Action control during its executing state.

Syntax

[get: Foundation.Export("executingHeight", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
[set: Foundation.Export("setExecutingHeight:", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
public virtual nfloat ExecutingHeight { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Defaults to the height of the StatusView. When the pull gesture ends after having passed the PullThreshold, the Pull to Action control will return to this height, until the ActionCompleted method is called.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

PulledAmount Property

The current distance that the Pull to Action has been pulled down by, in points.

Syntax

[get: Foundation.Export("pulledAmount")]
public virtual nfloat PulledAmount { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

PullThreshold Property

The distance at which an action is triggered, once the PulledAmount has exceeded this value.

Syntax

[get: Foundation.Export("pullThreshold", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
[set: Foundation.Export("setPullThreshold:", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
public virtual nfloat PullThreshold { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Defaults to 100 points. While the state of the control will change to SEssentialsPullToActionState.Triggered when this point is passed, the SEssentialsPullToActionDelegate.TriggeredAction(SEssentialsPullToAction) method will only be called once the drag motion is released. If you wish to trigger as soon as the threshold is reached, you should instead use the SEssentialsPullToActionDelegate.DidChangeState(SEssentialsPullToAction, SEssentialsPullToActionState, SEssentialsPullToActionState) method, and fire on the state changing to SEssentialsPullToActionState.Triggered.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

ResetToIdle Method

This is an optional method you can use to tell the control that the animation back to the idle state has completed, if a custom visualizer was provided.

Syntax

[Foundation.Export("resetToIdle")]
public virtual void ResetToIdle ()

Remarks

By default, this will call down to the `statusView` to inform it that it is safe to return to its idle state.

If the Visualizer is set to a custom SEssentialsPullToActionVisualizer, then it will need to call ResetToIdle in SEssentialsPullToActionVisualizer.ActionCompleted(SEssentialsPullToAction).

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

ScrollView Property

The UIScrollView that the Pull to Action is attached to.

Syntax

[get: Foundation.Export("scrollView", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
[set: Foundation.Export("setScrollView:", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
public virtual UIKit.UIScrollView ScrollView { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

We only hold a weak reference, as we are retained by the scrollView as one of its subviews.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

State Property

The current state of the Pull to Action.

Syntax

[get: Foundation.Export("state")]
public virtual SEssentialsPullToActionState State { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Defaults to SEssentialsPullToActionState.Idle.

Possible states are:

  • SEssentialsPullToActionState.Idle: The Pull to Action is not being animated, or interacted with.
  • SEssentialsPullToActionState.Pulling: The Pull to Action is being pulled down, but has not yet triggered an action.
  • SEssentialsPullToActionState.Triggered: The Pull to Action has been pulled down past the PullThreshold, and an action has been triggered.
  • SEssentialsPullToActionState.Executing: The pull gesture on the control has finished, and the action is now executing.
  • SEssentialsPullToActionState.Retracting: The action has now completed, and the control is now returning to the idle state.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

StatusView Property

The status view which is displayed when you interact with the Pull to Action control.

Syntax

[get: Foundation.Export("statusView", ObjCRuntime.ArgumentSemantic.Strong)]
[set: Foundation.Export("setStatusView:", ObjCRuntime.ArgumentSemantic.Strong)]
public virtual ISEssentialsPullToActionStatusView StatusView { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

This defaults to a view with an arrow and text showing the status of the control. The default view can be configured with the Style property. You can set this view if you want to display your own custom view in the control.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

Style Property

By default, the control displays a default status view.

Syntax

[get: Foundation.Export("style", ObjCRuntime.ArgumentSemantic.Strong)]
[set: Foundation.Export("setStyle:", ObjCRuntime.ArgumentSemantic.Strong)]
public virtual SEssentialsPullToActionStyle Style { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

This property allows you to configure how that default view looks.

Warning: Setting the style will cause the component to apply the style when the component is next rendered.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4

Visualizer Property

Handles the visualization of the Pull to Action control.

Syntax

[get: Foundation.Export("visualizer", ObjCRuntime.ArgumentSemantic.Strong)]
[set: Foundation.Export("setVisualizer:", ObjCRuntime.ArgumentSemantic.Strong)]
public virtual ISEssentialsPullToActionVisualizer Visualizer { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

This defaults to a visualizer which anchors the status view to the bottom of the Pull to Action control.

You can provide your own visualizer to handle the look and feel of the Pull to Action control. The visualizer is notified of any changes in state, along with changes to the PulledAmount property on the control.

Requirements

Namespace: Shinobi.Essentials
Assembly: ShinobiEssentials (in ShinobiEssentials.dll)
Assembly Versions: 2.8.0.4