EDit:
I have tabbarcontroller with two tabs, first tab I have a viewController , second tab I have navigationViewController with two stack of ViewControllers with tableView.
Tab1--->VC1
Tab2--->NVC-->fistVC1----push to----->secondVC2.
my code to push:
fistVC1.m
  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
       if (indexPath.section == 0 & (indexPath.row == 0)) {
    _secondVC2 = [[secondVC2 alloc] init];
    [self.navigationController pushViewController:_secondVC2 animated:YES];
    [_secondVC2 release];
what I need to do is set VC1 as a delegate of secondVC2, when secondVC2 cell selected i Want to send message to the VC1.
how can i do this ,please give me some advise.
i tried like blow:
secondVC2.h
 @protocol secondVC2Delegate <NSObject>
   - (void)someMethod;
 @end
 #import <UIKit/UIKit.h>
  @interface secondVC2 :UIViewController<UITableViewDelegate,UITableViewDataSource>
 {
     id<secondVC2Delegate>delegate;
 }
@property (nonatomic ,assign) id<secondVC2Delegate>delegate;
 @end;
secondVC2.m
  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
     NSLog(@"delegate%@",self.delegate);
     if (indexPath.row == 0) {
      [self.delegate someMethod];
     }
VC1.h
    #import <UIKit/UIKit.h>
    #import"secondVC2"
    @interface VC1 :UIViewController<secondVC2Delegate>{
     secondVC2 *tvc2;
    }
    @property (nonatomic ,retain) secondVC2 *tvc2;
    - (void)someMethod;
    @end;
VC1.m
   - (void)viewDidLoad
    {
       tvc2 = [secondVC2 alloc] init];
       tvc2.delegate = self;
    }
but the delegate kept released and i got nil delegate in the secondVC2 which i dont know why . So how could i achive this ?