Blounty
Blounty

Reputation: 3358

Monotouch Binding Categories (Using Category Attribute)

I am trying to bind the lib XYOrigami but seem to be hitting a few issues. The current documentation on Xamarin.com docs advises using the Category attribute, i get an error advising this could not be found and resolving the reference adds a using to System.ComponentModel. The binding project builds without issue but the two methods are not available on any UIView objects.

Any help would be appreciated.

namespace XYOrigami
{
  delegate void OrigamiAnimationCompleted (bool finished);

  [BaseType (typeof(UIView))]
  [Category]
  interface Origami{

      [Export ("showOrigamiTransitionWith:NumberOfFolds:Duration:Direction:completion:")]
      void ShowOrigamiTransition (UIView view, int folds, float duration, XYOrigamiDirection direction, OrigamiAnimationCompleted completed);

      [Export ("hideOrigamiTransitionWith:NumberOfFolds:Duration:Direction:completion:")]
      void HideOrigamiTransition (UIView view, int folds, float duration, XYOrigamiDirection direction, OrigamiAnimationCompleted completed);
  }
}

Upvotes: 2

Views: 201

Answers (1)

chrisntr
chrisntr

Reputation: 2208

It looks like the documentation is a little ahead of itself there. This is going to be added to a future version of MonoTouch but isn't currently released yet (hence it not finding the correct Category attribute)

Upvotes: 3

Related Questions