ios - Sending data between ViewController with JASidePanels -


i trying implement jasidepanels centerviewcontroller slides , reveals leftviewcontroler contains tableview. once user selects row in tableview, i'd centerview regain it's position sliding , have method (within centerviewcontroller) called parameter leftviewcontroller update centerview. can please this?

thank you.

there 2 parts solving problem:

  1. first showing center panel when user select row:

[self.viewcontroller showcenterpanelanimated:yes]; // add method tableview row

  1. passing message center panel new instruction, can done creating delegate or notification. keep simple use notification:

in left panel class:

 // add tableview row method     nsnotification *msg = [nsnotification notificationwithname:@"leftpanelmsg" object:@"hello"];     [[nsnotificationcenter defaultcenter] postnotification:msg]; 

in center panel class: add observer in viewdidload , method when message passed back:

- (void)viewdidload {     [super viewdidload];      // method listen meesssage specfic name , calls selector when hit     [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(msgresponder:) name:@"leftpanelmsg" object:nil];     }  -(void)msgresponder:(nsnotification *)notification {     nslog(@"name:%@ object:%@", notification.name, notification.object); } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -