0

I have a table with a list of employee data. User can select the employee and approve/reject the employee's application. If rejected user is supposed to select the reason for rejection and enter comments. I am using UIModalPresentationFormsheet to display a view with a UITextField, UIPicker and two buttons(reject & cancel).

When user taps on the reject button, I make a web-service call to change the status in the server and change the value in the local object holding employee data. When the reject action is tapped, I am able to perform both the actions, but the main screen in the background is not refreshed. But when I try to push the rejection screen normally(not as UIModalPresentationFormsheet) everything works fine.

I have tried calling the function to force refresh the view still it doesn't work. Can anyone please help with this issue.

Thank you...

Tyagi
  • 37
  • 7

1 Answers1

0

Use NSNotificationCenter.

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateSomething:) name:@"updateSomething" object:nil];

[[NSNotificationCenter defaultCenter] postNotificationName:@"updateSomething" object:nil];
WrightsCS
  • 50,551
  • 22
  • 134
  • 186
  • Thanks WrightCS... I didn't get a chance to implement it, but have gone through NSNotificationCenter and I think it should solve my issue. Sorry for the late (reply didn't have internet access for few days)... – Tyagi Feb 22 '11 at 20:15