Is it OK if dismissModalViewControllerAnimated: gets called before presentModalViewControllerAnimated:?

StackOverflow https://stackoverflow.com/questions/5922666

سؤال

I'm doing:

if (navigationController.visibleViewController == passcodeInputNav) {
    [navigationController dismissModalViewControllerAnimated:NO];
}

Is the condition unnecessary? Can I just do:

[navigationController dismissModalViewControllerAnimated:NO];

What happens if there's no modal view controller?

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top