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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:01:25+00:00 2026-06-13T23:01:25+00:00

I know this question is asked once every two days. I can not see

  • 0

I know this question is asked once every two days. I can not see what I am doing wrong though.
I have a storyboard navigation controller based app.

My notification and pop / push segues works well, only thing is I can not add string to parents view NSmutablearray.

I want to add a string object to parent view’s nsmutablearray. My decent code does not pass any data.

parent.h

@interface CreaatePlistTableViewController : UITableViewController<UITableViewDelegate, UITableViewDataSource>{

    NSMutableArray *presenterList;

}
@property (nonatomic, strong) NSMutableArray *presenterList;

parent.m

NSString * const NOTIF_CreatePlist_UpdateTableview= @"CreatePlist/UpdateTableview";
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Private interface definitions for update tableview
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
@interface CreaatePlistTableViewController (private)
- (void)CreatePlistUpdateTableview:(NSNotification *)notif;
@end

@implementation CreaatePlistTableViewController
@synthesize presenterList=_presenterList;

- (void)viewDidLoad
{
    [super viewDidLoad];

    _presenterList=[[NSMutableArray alloc] init];

    // Register observer to be called when logging out
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(CreatePlistUpdateTableview:)
                                                 name:NOTIF_CreatePlist_UpdateTableview object:nil];

    NSLog(@"Presenter List: %@", _presenterList);

}


- (void)CreatePlistUpdateTableview:(NSNotification *)notif{
    NSLog(@"Notification recieved");
    NSLog(@"Presenter List: %@", _presenterList);
    [_createPlistTableview reloadData];
}

child.h

@interface AddPresenterViewController : UITableViewController<UITextFieldDelegate,UIAlertViewDelegate>{
    CreaatePlistTableViewController *crereaatePlistTableViewController;
}
@property(nonatomic,strong) CreaatePlistTableViewController *crereaatePlistTableViewController;

child.m

@synthesize crereaatePlistTableViewController=_crereaatePlistTableViewController;
//finished adding presenter
-(IBAction)finishedAddingPresenter:(id)sender{

    //some xml string here
    NSLog(@"final result XML:\n%@", writer.XMLString);


    _crereaatePlistTableViewController=[[CreaatePlistTableViewController alloc]init];
    //add object to parents view data source
    [_crereaatePlistTableViewController.presenterList addObject:writer.XMLString];

    //dismiss the view
     [self.navigationController popViewControllerAnimated:YES];

    //notify the parent view to update its tableview

    [[NSNotificationCenter defaultCenter] postNotificationName:@"CreatePlist/UpdateTableview" object:nil];

}

Output

Notification recieved
Presenter List: (
)

So notification works when I click the button. But it does not pass object to nsmutablearray.

What I am doing wrong here ? How can I add an object to parent view’s nsmutablearray?

  • 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-13T23:01:26+00:00Added an answer on June 13, 2026 at 11:01 pm

    It seems everything is good except your alloc of parent view object I am not that familiar with storyboard but You said you are using navigation navigation controller

    so change this

     _crereaatePlistTableViewController=[[CreaatePlistTableViewController alloc]init];
    

    to

     _crereaatePlistTableViewController= [self.navigationController.viewControllers objectAtIndex:0];
    

    It may work I am not sure

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

Sidebar

Related Questions

I asked this question once time in https://stackoverflow.com/questions/12814603/ but i do not know why
I know this question was asked earlier once but I see no answer to
This question has been asked more than once before, but I have not found
I know this question had been asked a hundred times, but I have difficulties
I know this question has been asked before and I have seen a plethora
I know this question have been asked lot of times that how to track
Variations on this question have been asked, but not this specifically. I have a
I know this question has been asked 100x but I can't seem to find
Folks, I know this question has been asked before here, though indirectly . But
Ok, so various forms of this question have been asked, but I can't find

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.