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 8293171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:44:11+00:00 2026-06-08T13:44:11+00:00

I am sending my text from a view-1 to another view-2 which has a

  • 0

I am sending my text from a view-1 to another view-2 which has a UITableView. When I push my data I to the other view-2 I can’t see the data until I close the application and open it again I can see that data in the table view.

I have used [self.navigationController popToRootViewControllerAnimated:YES]; and then reload the the table view but it doesn’t work.

More details; A(Add person button with UITableView)-> B(text field with submit button) -> A(Data shown on the table view). This is what I wanna do.

Could anybody help me please?

Here is my full code My Sample Code

Thanks from now.

  • 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-08T13:44:13+00:00Added an answer on June 8, 2026 at 1:44 pm

    I have seen your code and I Found one issue. just put below code from viewDidLoad to viewWillAppear method

    self.dataArray = [[NSUserDefaults standardUserDefaults] objectForKey:@"myTxtList"];
    self.dateArray = [[NSUserDefaults standardUserDefaults] objectForKey:@"myDateList"];
    

    May this will solve your issue.

    Happy Coding 🙂

    EDIT 1

    Ok the new cause may be as I found with your code is in submit method (IBAction).

    You create new view controller and just got to the rootview of navigation controller so change the first line of function

    ViewController *push = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
    

    to

    viewController *push = [self.navigationController.viewControllers objectAtIndex:0];
    

    with the change of above ie my original answer also add the edited answer and see.

    May this will solve your problem.

    Happy Coding 🙂

    FINAL EDIT

    I got the issue and have the changes in your code as below

    in ViewController.h file
    instead of

    @property (nonatomic, strong) NSArray *dateArray;
    

    use

    @property (nonatomic, strong) NSMutableArray *dateArray;
    

    next change is in ViewController.m file
    in viewWillAppear:animated method instead of

    self.dataArray = [[NSUserDefaults standardUserDefaults] objectForKey:@"myTxtList"];
    self.dateArray = [[NSUserDefaults standardUserDefaults] objectForKey:@"myDateList"];
    

    use

    [self.dataArray setArray:[[NSUserDefaults standardUserDefaults] objectForKey:@"myTxtList"]];
    [self.dateArray setArray:[[NSUserDefaults standardUserDefaults] objectForKey:@"myDateList"]];
    

    And your application will run as expected with no error or crash.

    Happy Coding 🙂

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

Sidebar

Related Questions

sending text to label and number to int from tabelview to viewcontroller but it
Hi Is there any way to block my iPhone from calling/sending text to a
I'm having trouble sending data to a different view using the prepareForSegue method… I
I am sending some text messages from the unix box to the normal internet
I am trying to make an ajax sending data in JSON from a partial
I am trying to bind data from json. In the controller, I am sending
javax.comm.NoSuchPortException at javax.comm.CommPortIdentifier.getPortIdentifier sending sms(text) from java code to mobile phone in windows i
I am sending an HTML text from PHP to Python via STDIN. My objctive
has everyone know how to sending an email from android device like mailto: in
I'm sending a HTML email from Outlook to my mail.live.com account. When I view

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.