I am presenting modal using the following code :
AddName *add = [[AddName alloc] initWithNibName:@\"AddName\" bundle:nil]
add.modalPresentationStyle = UIMod
-viewWillAppear
is only guaranteed to be called in places where the -viewWillDisappear
has also been called. For most modal windows on the iPad, this is not the case, since they don't obscure the entire page.
The solution to your problem will depend on what you need the -viewWillAppear
for, but in general, you're likely to need to make a call directly from the same place that you dismiss the modal view controller.
One common mechanism for this, especially in cases where you might use that same modal view somewhere else, is to give the modal view controller a delegate which is called when the view is about to disappear. This will give you a chance to take the responses from the modal window, or even just force a data reload in the delegate view.
Hope this helps.