开发者

how to refresh the root view after dismissal of a modal view?

After presenting another view on my rootview, then I dismiss it, I want to refresh or reload my view, is it possibl开发者_运维百科e?


Send the view setNeedsDisplay message.


I define a simple protocol for modal view controllers to use to notify their parent that they're done:

@protocol ModalViewControllerDelegate <NSObject>
- (void)modalViewControllerDone:(UIViewController*)viewController;
@end

The parent then implements this protocol, and assigns itself to the modal view controller's delegate property. When the modal view controller is finished, it calls [delegate modalViewControllerDone:self]. The parent then dismisses the modal view controller and can do whatever else it wants (in your case, reload something).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜