how can pass data back from current screen to previous screen after clicking back button, ios
I am transferring data from FirstView to SecondView after clicking on a button.

    FirstView.h
    @property (strong, nonatomic) NSString  *stringOfFirstView; 


>     FirstView.m
>         
>      - (void)pushToSecond {
>              SecondView *controller   =   [[SecondView alloc] initWithNibName:@"SecondView" bundle:nil];
>              controller.stringOfSecondView          =   self.stringOfFirstView;
>              [self.navigationController pushViewController:controller animated:NO];
>             
>             }

In SecondView, I have 

    SecondView.h
        @property (strong, nonatomic) NSString  *stringOfSecondView; 



At SecondView,my goal is to go back to FirstView by clicking on back button and also want assign `stringOfSecondView` to `stringOfFirstView` as well

**Question :**

    How can I assign stringOfSecondView to stringOfFirstView via clicking back button.


Just let you know, I am detecting an click event on back button in SecondView by doing

    SecondView.m
    - (void) viewWillDisappear:(BOOL)animated {
        [super viewWillDisappear:YES];
        if ([self.navigationController.viewControllers indexOfObject:self]==NSNotFound)
            NSLog(@"will show onto console");  
    
    } 

But I am stuck how to do passing data back

Please advice if you have any clues about this issue.
how can pass data back from current screen to previous screen after clicking back button, ios
===

I am transferring data from FirstView to SecondView after clicking on a button.

    FirstView.h
    @property (strong, nonatomic) NSString  *stringOfFirstView; 


>     FirstView.m
>         
>      - (void)pushToSecond {
>              SecondView *controller   =   [[SecondView alloc] initWithNibName:@"SecondView" bundle:nil];
>              controller.stringOfSecondView          =   self.stringOfFirstView;
>              [self.navigationController pushViewController:controller animated:NO];
>             
>             }

In SecondView, I have 

    SecondView.h
        @property (strong, nonatomic) NSString  *stringOfSecondView; 



At SecondView,my goal is to go back to FirstView by clicking on back button and also want assign `stringOfSecondView` to `stringOfFirstView` as well

**Question :**

    How can I assign stringOfSecondView to stringOfFirstView via clicking back button.


Just let you know, I am detecting an click event on back button in SecondView by doing

    SecondView.m
    - (void) viewWillDisappear:(BOOL)animated {
        [super viewWillDisappear:YES];
        if ([self.navigationController.viewControllers indexOfObject:self]==NSNotFound)
            NSLog(@"will show onto console");  
    
    } 

But I am stuck how to do passing data back

Please advice if you have any clues about this issue.