title: Xamarin IOS Facebook SDK LoginButton
body: <p>Im new to Xamarin and IOS development and dont understand why I get this following error:</p>
  
  <p>But first some Information:</p>
  
  <p>Im using this SDK:
  <a href="https://components.xamarin.com/view/facebookios" rel="nofollow noreferrer">https://components.xamarin.com/view/facebookios</a></p>
  
  <p>and creating my LoginButtin in my ViewController in ViewDidLoad like this:</p>
  
  <pre><code>loginButton = new LoginButton(new CGRect(48, 0, 218, 46))
              {
                  LoginBehavior = LoginBehavior.Native,
                  ReadPermissions = readPermissions.ToArray()
              };
              View.AddSubview(button);
  </code></pre>
  
  <p>But in my Storyboard I get this error message:</p>
  
  <p><a href="https://i.stack.imgur.com/4CDqO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4CDqO.jpg" alt="enter image description here"></a></p>
  
  <p>Edit: my ViewController.cs</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using UIKit;
  
  namespace FacebookLogin
  {
      public partial class ViewController : UIViewController
      {
          List&lt;string&gt; readPermissions = new List&lt;string&gt; { "public_profile" };
          LoginButton loginButton;
  
          public ViewController(IntPtr handle) : base(handle)
          {
          }
  
          public override void ViewDidLoad()
          {
              base.ViewDidLoad();
              // Perform any additional setup after loading the view, typically from a nib.
  
              loginButton = new LoginButton(new CGRect(48, 0, 218, 46))
              {
                  LoginBehavior = LoginBehavior.Native,
                  ReadPermissions = readPermissions.ToArray()
              };
              View.AddSubview(button);
          }
  
          public override void DidReceiveMemoryWarning()
          {
              base.DidReceiveMemoryWarning();
              // Release any cached data, images, etc that aren't in use.
          }
      }
  }
  </code></pre>