title: cannot find protocol declaration custom protocol delegate iphone
body: <p>Slowly but surely getting this delegation and protocol stuff on iphone but I cannot understand this error.</p>
  
  <p>I have declared my protocol in my first viewcontroller.</p>
  
  <p>In the second viewcontroller i try to add it at the top after i have imported it into the header file and it cannot find it. see my code below.</p>
  
  <p>//SendSMS</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "LoginPage.h"
  #import "MessageOptions.h"
  
  @protocol SMSProtocol &lt;NSObject&gt;
  
  -(NSString *)postbackType;
  
  @end
  
  
  @interface SendSMS : UIViewController &lt;UITextViewDelegate, UITextFieldDelegate&gt; {
  
      id&lt;SMSProtocol&gt; delegate;
  
      MessageOptions *messageOptions;
      LoginPage *loginPage;
      IBOutlet UITextField *phonenumber;
      IBOutlet UITextView *smsBody;
      IBOutlet UIScrollView *scrollview;
  
  }
  
  @property (nonatomic, retain) id&lt;SMSProtocol&gt; delegate;
  
  -(IBAction)LoadMessageOptions;
  
  @end
  </code></pre>
  
  <p>Then my second view</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "SendSMS.h"
  
  @interface ScheduledSMS : UIViewController &lt;SMSProtocol&gt;{
  
  
  
  }
  
  
  -(IBAction)popBack;
  
  @end
  </code></pre>