How to set label.text with NSString as soon as new view loaded, NSString value is set in class method
<p>I want to set label on my new view (which I am loading on selection of table row) to variable NSString value,
here is what I am doing    </p>

<pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath          
 {

    int selected_row = [indexPath row];
    SingleTon *index_instance = [SingleTon sharedInstanceIndex];
    [index_instance setIndex:selected_row];
    selected_row = [index_instance getIndex:selected_row]; 
    NSLog(@"Selected row %d", selected_row);
    [SelecetionViewController uploadthecontent:selected_row];
    [self presentModalViewController:selection_controller animated:YES];
}  
</code></pre>

<p>.h file contains  </p>

<pre><code>NSString *rest_name;
IBOutlet UILabel *lbl;   
//Some class methods declared
</code></pre>

<p>.m file contains</p>

<pre><code>- (void)viewDidLoad { 

    [super viewDidLoad];  
    lbl.text = rest_name;   
}

//class method
+ (void)uploadthecontent:(int)data  
{  
    SelecetionViewController *controller = [[SelecetionViewController alloc] init];  
    [controller labelset:data];    //calls labelset method which set rest_name to some value
    [controller release];  

}

-(void)labelset:(int)data{

    [rest_name release];
    SingleTon *indexinstance = [SingleTon sharedInstanceIndex];
    SingleTon *rnameinstace = [SingleTon sharedInstance1];
    //SingleTon *baddrinstance = [SingleTon sharedInstance2];
    NSMutableArray *selected_rname;
    //eNSMutableArray *selected_baddr;
    int i = [indexinstance getIndex:data];
    selected_rname = [rnameinstace getRName:selected_rname];
    NSString * rname = [[NSArray arrayWithArray:selected_rname] objectAtIndex:i];
    NSLog(@"Retaurant name : %@",rname);
    //lbl.text = rest_name;
    rest_name = [[NSString alloc] init];
    rest_name = rname;
    NSLog(@"I am here : %@",rest_name);
    //[rest_name retain];
}

//rest_name is what I am trying to access and set as label
</code></pre>
