Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

How to use modal view controller? #9

Closed
jiripsota opened this Issue · 7 comments

4 participants

@jiripsota

Hello, is there way how to correctly use modal view?
For example when I want to present modal view in some content screen (selected by menu). View is presented correctly, but when is need to close modal view by dismissModalViewControllerAnimated it does not work.
View is closed but content view is reset to first controller.

Thanks a lot for any advice.
All best.

@gresrun gresrun was assigned
@gresrun
Owner

I'm not sure I understand your question. Are you presenting a modal view as a result of an action in a content view and when you dismiss the modal view, the launching content view has been reset to the original?

@roncito

presenting a modal view as a result of an action in a content view and when you dismiss the modal view,
the launching content view has been reset to the original

I am observing this exact behavior.

@rbauer

I also am experiencing this same problem. Any help would be appreciated.

@rbauer

I have found that the viewWillAppear method on the GHMenuViewController was getting called (as it should) when the modal was being dismissed. Inside of this method, the [self selectRowAtIndexPath: ...] was being called and setting the selected menu item to the root item.

I removed this from the viewWillAppear method and added it to the viewDidLoad method instead. This seems to have resolved the problem for me. Hope it does for anyone else experiencing the same problem.

@roncito

This works for me as well. Thanks!

@gresrun gresrun referenced this issue from a commit
Greg Haines Fix for Issue #9 1a63d51
@gresrun
Owner

Let me know if this fix works for everyone.

@gresrun
Owner

Closing since this looks fixed and no one cared to complain again.

@gresrun gresrun closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.