I have two viewcontrollers, ViewControllerA and ViewControllerB respectively.
On ViewcontrollerB there are tableview cells. On click of tableview cells I want to send the data selected on ViewControllerB to label on ViewControllerA.
I know it can be achieved through many ways but how can this be achieved through blocks.Kindly suggest.
Thanks in advance!
ViewController B
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *viewArr = [self.array objectAtIndex:indexPath.row];
NSLog(@"the value obtained on cell is %@",viewArr);
ViewController *vc=[[ViewController alloc]init];
vc.aSimpleBlock(viewArr);
}