开发者

UIModalPresentationFormsheet action does not refresh the main view

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...


Use NSNotificationCenter.

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

[[NSNotificationCenter defaultCenter] postNotificationName:@"updateSomething" object:nil];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜