Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

User defined attributes cause key coding compliant error

$
0
0

I create a user defined attribute on a UIButton in xcode. Save and exit xCode.

When I run my iOS simulator I get a key coding compliant error. I have an UIButton and I created a user defined attribute called "styleId"

Is my definition of the attribute incorrect? ( styleId )

public partial class MyController : UIViewController { public MyController () : base ("MyController", null) { }

    public override void DidReceiveMemoryWarning ()
    {
        // Releases the view if it doesn't have a superview.
        base.DidReceiveMemoryWarning ();

        // Release any cached data, images, etc that aren't in use.
    }

    public override void ViewDidLoad ()
    {
        base.ViewDidLoad ();

        // Perform any additional setup after loading the view, typically from a nib.
    }

    [Connect]
    NSString styleId { 
        get {
            return (NSString)GetNativeField ("styleId");
        }

        set {
            SetNativeField ("styleId", (NSObject)value);
        }

    }
}

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>