title: passing data value between two view controller using custom protocol
body: <p>1) I Am passing the value between two view controller using custom
      protocol..But the value always showing NULL.</p>
  
  <p>I need to pass the value  from second view controller to first view controller</p>
  
  <p>2) In Secondview controller.h</p>
  
  <pre><code>@protocol PopoverTableViewControllerDelegate &lt;NSObject&gt;
  
  @property (nonatomic, strong) id&lt;PopoverTableViewControllerDelegate&gt;myDelegate;
  </code></pre>
  
  <p>3) secondview controller.m</p>
  
  <pre><code>(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  
   {
        NSDictionary*dict=[sercharray objectAtIndex:index]; 
        str=[dict objectForKey:@"id"];
        NSLog(@"test value %@",str);
        [self.myDelegate didSelectRow:str];
        NSLog(@"delegate value %@",self.myDelegate);
  //THIS VALUE ALWAYS SHOWING NULL AND ALSO I SHOULD PASS THIS VALUE TO FIRST VIEW
        CONTROLLER.I SHOULD USE DISMISS VIEW CONTROLLER. 
        [self dismissViewControllerAnimated:YES completion:nil];
    }
  </code></pre>
  
  <p>4) First View controller.h</p>
  
  <pre><code>@interface Firstviewcontroller :
      UIViewController&lt;PopoverTableViewControllerDelegate&gt;
  </code></pre>
  
  <p>5) First view controller.m</p>
  
  <pre><code>secondviewcontroller *next=[[seconviewcontroller alloc]init];
  next.myDelegate=self;
  
  
  (void)didSelectRow:(NSString *)cellDataString {
      passstring = cellDataString;
      NSLog(@"pass string %@",pass string);
  //first view controller str variable value i need to pass this string[passstring].       
   }
  </code></pre>