I have a main Viewcontroller and a Child Viewcontroller.
I realized that when closing Childviewcontroller, for example:
self.dismissViewControllerAnimated(true, completion: {
self.dismissViewControllerAnimated(true, completion: nil);
});
it just releases the viewview child controller and I will see the mainview controller. No other code is processed
if I close the child view control with a notification to the main view manager:
self.dismissViewControllerAnimated(true, completion: {
NSNotificationCenter.defaultCenter().postNotificationName("refreshtextviewer_with_bookmark", object: nil);
self.dismissViewControllerAnimated(true, completion: nil);
});
then my refreshtextviewer_with_bookmark () function is called in the main view manager and the standard viewDidLoad () is also called in parallel.
Is this the usual behavior that causes viewDidLoad () in this case after the child view controller is rejected? Is there any way to prevent this?