title: UIView setDelegate:]: unrecognized selector sent to instance
body: <p>I am new to IOS, and Trying to pass two values form a UIViewController to a UIView. I followed few examples,some posts, tried and still no luck. I am getting this error while running the application. The error is ..</p>
  
  <p>[MenuComponent setDelegate:]: unrecognized selector sent to instance </p>
  
  <p>MenuComent is My UIView. FullVC is my UIViewController.  </p>
  
  <p>FullVC.h</p>
  
  <pre><code> @class FullVC;
      @protocol MenuComponentDelegate &lt;NSObject&gt;   
  
      -(void)shareToView:(NSString *)titleString inUrl:(NSString *)urlString;
  
      @end 
      @interface FullVC:UIViewController&lt;UIScrollViewDelegate,UITextViewDelegate&gt; 
  </code></pre>
  
  <p>@property  (nonatomic,assign) id  delegate;</p>
  
  <p>@end</p>
  
  <p>FullVC.m</p>
  
  <pre><code>    @interface FullVC () 
  
      @end
  @implementation FullVC
  
      @synthesize delegate;
  
  
      - (void)viewDidLoad
      {
          [super viewDidLoad];
      }
  
      -(void)scrollViewInit
      {
          [self.delegate shareToView:title.text inUrl:urlString];
      }
   @end
  </code></pre>
  
  <p>MenuComponent.m</p>
  
  <p>@interface MenuComponent() </p>
  
  <p>@end
  @implementation MenuComponent</p>
  
  <pre><code>    -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
      {
  
        if ([self.nav_controller.topViewController isKindOfClass:[FullVC class]])
         {
            if (indexPath.row==0)
              {
                  [(FullVC *)self setDelegate:self];
              }
         }
  
      }
      -(void)shareToView:(NSString *)titleString inUrl:(NSString *)urlString
      {
         NSLog(@"title string after passing is: %@", titleString);
         NSLog(@"url string after passing is: %@", urlString);
      }
      @end
  </code></pre>
  
  <p>I am getting error at this statement. </p>
  
  <p>[(FullVC *)self setDelegate:self];</p>
  
  <p>can somebody please help. </p>
  
  <p>Thanks</p>