Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8272283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:05:01+00:00 2026-06-08T07:05:01+00:00

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

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:05:02+00:00Added an answer on June 8, 2026 at 7:05 am

    I would use a delegate. So in your SecondView you need to create a protocol that sends data back to your FirstView. Your FirstView would become a delegate of the SecondView. There are tons of tutorials on how to make a delegate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using the Bluetooth chat example for transferring data over Bluetooth from
I'm working on transferring data from one database to another. For this I have
Adobe Cirrus offers a number of options for transferring data from peer to peer:
I'm looking for method of transferring user entered data from a banner Advertisement to
I'm transferring data from one database to another (upgrading a system) and have a
What is the fastest way of transferring few thousand rows of data from one
I am currently transferring data from one database to another. My problem occurs with
I tested the performance of transferring data from a program to another over socket
I have data from JSON response that I am transferring to an array as
For transferring some data from to excel via php I am using this function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.