I am getting the following error when i run the project, indicated in the line `secView.delegate=self;`  

How can i solve the above problem? Thanks!

> 
> Property 'delegate' object not found on type 'UIViewController \*'
> 
> 
> 

myViewController.h

```
@interface myViewController : UIViewController <UITextFieldDelegate,UIAlertViewDelegate,secondViewControllerDelegate>
- (IBAction)popBookmarkTable:(id)sender;

```

myViewController.m

```
- (IBAction)popBookmarkTable:(id)sender {
    UIStoryboard *st = [UIStoryboard storyboardWithName:[[NSBundle mainBundle].infoDictionary objectForKey:@"UIMainStoryboardFile"] bundle:[NSBundle mainBundle]];
    UIViewController *secView = [st instantiateViewControllerWithIdentifier:@"bookmarkViewController"];
[self presentViewController:secView animated:YES completion:nil];

    secView.delegate=self;
}

- (void)passData:(NSString *)data
{

          _addressBar.text=data;

    }

```

bookmarkViewController.h

```
@protocol secondViewControllerDelegate <NSObject>

@required

- (void)passData:(NSString *)data;

@end
@property (nonatomic, weak) id<secondViewControllerDelegate> delegate;
@property (nonatomic,strong) NSString *a;
@end

```

bookmarkViewController.m

```
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
   UITableViewCell * cell = [tableView cellForRowAtIndexPath:indexPath];
              if ([indexPath row]==0) {
                   _a=(NSString *)cell.textLabel.text;
                  [_delegate passData:_a];
                  [self dismissViewControllerAnimated:YES completion:nil];

              }

}

```