#import <UIKit/UIKit.h>
@interface开发者_StackOverflow社区 AddRecipientsTableViewController : UITableViewController {
NSMutableArray *recipientItems;
}
-(IBAction) btnLocalRecipients;
-(IBAction) btnRemoteRecipients;
-(IBAction) btnNext;
@end
In my implementation I have:
#import "AddRecipientsTableViewController.h"
#import "AddLocalRecipientsTableViewController.h"
#import "AddRemoteRecipientsTableViewController.h"
@implementation AddRecipientsTableViewController
-(IBAction) btnLocalRecipients{
    AddLocalRecipientsTableViewController *addLocalRecipientsTableViewController = [[AddLocalRecipientsTableViewController alloc]init];
    addLocalRecipientsTableViewController.navigationItem.title=@"Local Recipients";
    [self.navigationController pushViewController:addLocalRecipientsTableViewController animated:YES];
    [addLocalRecipientsTableViewController release];
}
How do I set the value for recipientItems from within addLocalRecipientsTableViewController?
You have two options.
Option A Create an init method in your AddLocalRecipientsTableViewController that accepts a pointer to recipentItems.
I would choose option A if I would want to manage adding inside the viewController.
Option B Use NSNotifications to send a new recipient when it is created.
I would choose option B if I would want to manage all tasks related to recipientItems in one class AddRecipientsTableViewController.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论