Open gkuhlmann14 opened 8 years ago
https://github.com/goktugyil/EZSwipeController/issues/13
this might help out
I saw that, but couldn't end up getting:
app->ezswipe ezswipe->profileVC ezswipe->navigation controller->messagesVC
to work nicely.
How I've got it going now, is I've put my EZSwipe VC in a nav controller. Then, in the standard swipe mode I use the EZswipe nav bar, and HIDE the navigation controller nav bar. Then when a user selects a message, I unhide the navigation controller nav bar and push my VC. This gives it the same feel of a nav, and since the EZswipe is contained in the nav, I end up getting the swipe right gesture to navigate back when I push/pop VC's which is nice.
It works alright, but still not as slick as I think it could be.
I tried making the EZswipe itself a nav controller and was seeing some wonky behaviour when pushing/popping and unfortunately need to ship tomorrow. I'll update this issue if I end up getting it working correctly.
I ran into a problem with pushing and popping VC's in the EZSwipe hierarchy.
I've seen some suggestions on here with embedding the EZSwipe in a UINavigationController. I've tried that and it seems to not play nicely with the EZSwipe nav bar. What I think would be really nice is if we actually made the EZSwipe itself a nav controller, and make it smart enough to know which VC in the stack had a VC pushed to it, and we could ideally use the EZSwipe nav bar as the same nav bar used when pushing/popping to the navigation stack.
Lets take a 2 VC example where you have a profile (left) and a messages (right) VC. In your messages VC, you want to be able to click on a conversation with someone and simply push that conversation VC to the stack.
I've seen how the standard EZSwipe is:
app->ezswipe ezswipe->profileVC ezswipe->messagesVC
Also I've seen suggested if you want to push/pop VC's:
app->ezswipe ezswipe->profileVC ezswipe->navigation controller->messagesVC
The problem with this in my experience so far is that when you push/pop in the messages VC it doesnt play nicely with the EZswipe. For example, if you click on a message and push a conversation VC to your nav stack, the user will still be able to swipe right and navigate to the profile VC. In my opinion, if you swipe right you should dismiss the conversationVC and be back at the messagesVC (then swipe right again to get to your profileVC.
I'm playing around with it now, but what would the implications be if we actually made the EZSwipeController inherit from the UINavigationController class as opposed to a UIViewController class?
If we could make it so you can push/pop anywhere in the EZSwipe and the VC would know how to handle it.