Pass An Object Between 2 View Controllers
I'm trying to pass an object between 2 VCs, from a popover to the detail view of split view controller.

I think I need to use NSNotificationCenter.

I tried this but can't seem to get it to work.

In `didSelectRow` of popover
   

      [[NSNotificationCenter defaultCenter] postNotificationName:@"PassObject" withObject:objectToPass];

In `detail VC`

        - (void) didReceiveNotificationPassObject:(NSNotification*)notification  
        {
            YourObjectClass *theObject = (YourObjectClass*)notification.object;
        }
        
        - (void)viewDidLoad 
        {
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveNotificationPassObject:) name:@"PassObject" object:nil];
        }
Pass An Object Between 2 View Controllers
===

I'm trying to pass an object between 2 VCs, from a popover to the detail view of split view controller.

I think I need to use NSNotificationCenter.

I tried this but can't seem to get it to work.

In `didSelectRow` of popover
   

      [[NSNotificationCenter defaultCenter] postNotificationName:@"PassObject" withObject:objectToPass];

In `detail VC`

        - (void) didReceiveNotificationPassObject:(NSNotification*)notification  
        {
            YourObjectClass *theObject = (YourObjectClass*)notification.object;
        }
        
        - (void)viewDidLoad 
        {
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveNotificationPassObject:) name:@"PassObject" object:nil];
        }