Error de devolución de categoría binding de Xamarin: no puede declarar miembros de instancia en una class estática

Estoy intentando vincular ReFrostedViewController a c #. Usé Objective Sharpie para generar interfaces. Pero cuando uso Xamarin para comstackrlo, devuelve el error.

/REFrostedViewController_UIViewController.g.cs(10,10): Error CS0708: `REFrostedMenu.REFrostedViewController_UIViewController.__mt_FrostedViewController_var': cannot declare instance members in a static class (CS0708) (REFrostedBinding) 

Aquí está mi código:

 [Export ("frostedViewController", ArgumentSemantic.Retain)] REFrostedViewController FrostedViewController { get; } 

Lo cambié como a continuación:

 [Export ("frostedViewController", ArgumentSemantic.Retain)] REFrostedViewController FrostedViewController() 

puede comstackr pero no puedo getlo de UIViewController.

 REFrostedViewController reFrost = base.FrostedViewController(); 

devuelve el error:

 /MainViewController.cs(43,43): Error CS0117: `MonoTouch.UIKit.UIViewController' does not contain a definition for `FrostedViewController' (CS0117) (iOS) 

ACTUALIZACIÓN: aquí está el código completo

 using System; using System.Drawing; using MonoTouch.ObjCRuntime; using MonoTouch.Foundation; using MonoTouch.UIKit; namespace REFrostedMenu { [BaseType (typeof (UIViewController))] public partial interface REFrostedContainerViewController { [Export ("screenshotImage", ArgumentSemantic.Retain)] UIImage ScreenshotImage { get; set; } [Export ("frostedViewController", ArgumentSemantic.Assign)] REFrostedViewController FrostedViewController { get; set; } [Export ("animateApperance")] bool AnimateApperance { get; set; } [Export ("containerView", ArgumentSemantic.Retain)] UIView ContainerView { get; } [Export ("panGestureRecognized:")] void PanGestureRecognized (UIPanGestureRecognizer recognizer); [Export ("hide")] void Hide (); [Export ("resizeToSize:")] void ResizeToSize (SizeF size); // [Export ("hideWithCompletionHandler:")] // void HideWithCompletionHandler(HideCompletionHandler handler); [Export ("refreshBackgroundImage")] void RefreshBackgroundImage (); } [BaseType (typeof (UIViewController))] public partial interface REFrostedViewController { [Export ("panGestureRecognizer", ArgumentSemantic.Retain)] UIPanGestureRecognizer PanGestureRecognizer { get; } [Export ("panGestureEnabled")] bool PanGestureEnabled { get; set; } // [Export ("direction")] // REFrostedViewControllerDirection Direction { get; set; } [Export ("backgroundFadeAmount")] float BackgroundFadeAmount { get; set; } [Export ("blurTintColor", ArgumentSemantic.Retain)] UIColor BlurTintColor { get; set; } [Export ("blurRadius")] float BlurRadius { get; set; } [Export ("blurSaturationDeltaFactor")] float BlurSaturationDeltaFactor { get; set; } [Export ("animationDuration")] double AnimationDuration { get; set; } [Export ("limitMenuViewSize")] bool LimitMenuViewSize { get; set; } [Export ("menuViewSize", ArgumentSemantic.Assign)] SizeF MenuViewSize { get; set; } [Export ("liveBlur")] bool LiveBlur { get; set; } // [Export ("liveBlurBackgroundStyle")] // REFrostedViewControllerLiveBackgroundStyle LiveBlurBackgroundStyle { get; set; } // [Export ("delegate", ArgumentSemantic.Assign)] // REFrostedViewControllerDelegate Delegate { get; set; } [Export ("contentViewController", ArgumentSemantic.Retain)] UIViewController ContentViewController { get; set; } [Export ("menuViewController", ArgumentSemantic.Retain)] UIViewController MenuViewController { get; set; } [Export ("initWithContentViewController:menuViewController:")] IntPtr Constructor (UIViewController contentViewController, UIViewController menuViewController); [Export ("presentMenuViewController")] void PresentMenuViewController (); [Export ("hideMenuViewController")] void HideMenuViewController (); [Export ("resizeMenuViewControllerToSize:")] void ResizeMenuViewControllerToSize (SizeF size); // [Export ("hideMenuViewControllerWithCompletionHandler:")] // void HideMenuViewControllerWithCompletionHandler (HideMenuViewControllerCompletionHandler handler); [Export ("panGestureRecognized:")] void PanGestureRecognized (UIPanGestureRecognizer recognizer); } [BaseType (typeof (NSObject))] [Model] public partial interface REFrostedViewControllerDelegate { [Export ("frostedViewController:willAnimateRotationToInterfaceOrientation:duration:")] void WillAnimateRotationToInterfaceOrientation (REFrostedViewController frostedViewController, UIInterfaceOrientation toInterfaceOrientation, double duration); [Export ("frostedViewController:didRecognizePanGesture:")] void DidRecognizePanGesture (REFrostedViewController frostedViewController, UIPanGestureRecognizer recognizer); [Export ("frostedViewController:willShowMenuViewController:")] void WillShowMenuViewController (REFrostedViewController frostedViewController, UIViewController menuViewController); [Export ("frostedViewController:didShowMenuViewController:")] void DidShowMenuViewController (REFrostedViewController frostedViewController, UIViewController menuViewController); [Export ("frostedViewController:willHideMenuViewController:")] void WillHideMenuViewController (REFrostedViewController frostedViewController, UIViewController menuViewController); [Export ("frostedViewController:didHideMenuViewController:")] void DidHideMenuViewController (REFrostedViewController frostedViewController, UIViewController menuViewController); } [BaseType (typeof (UIImage))] [Category] public partial interface REFrostedViewController_UIImage { [Export ("re_applyBlurWithRadius:tintColor:saturationDeltaFactor:maskImage:")] UIImage Re_applyBlurWithRadius (float blurRadius, UIColor tintColor, float saturationDeltaFactor, UIImage maskImage); [Export ("re_screenshot")] UIImage Re_screenshot (); } [BaseType (typeof (UIViewController))] [Category] public partial interface REFrostedViewController_UIViewController { [Export ("frostedViewController", ArgumentSemantic.Retain)] REFrostedViewController FrostedViewController(); [Export ("re_displayController:frame:")] void Re_displayController (UIViewController controller, RectangleF frame); [Export ("re_hideController:")] void Re_hideController (UIViewController controller); } } 

¡Por favor, ayúdame, estoy muy agradecido!

Creé un proyecto binding y muestro como un tenedor en Github: https://github.com/therealjohn/REFrostedViewController

El error "no puede declarar miembros de instancia en un error de class estática" se debió a

 [Export ("frostedViewController", ArgumentSemantic.Retain)] REFrostedViewController FrostedViewController { get; } 

Lo que estaba tratando de crear una propiedad en una categoría, que básicamente es un método de extensión. No hay properties de C # de "extensión", por lo que su cambio a un método "solucionó" ese error.

No estoy seguro de qué otros problemas tenía, pero el proyecto que hice debería funcionar para usted.

¡Disfrutar!