fastred / SloppySwiper

UINavigationController delegate that allows swipe back gesture to be started from anywhere on the screen (not just from the edge).
MIT License
806 stars 107 forks source link

Its's awkward with TabBarController. #21

Open kuldeep13990 opened 7 years ago

kuldeep13990 commented 7 years ago

In my first Screen there's bottom view with Home, Trending when I push to another view & pop using SloppySwiper my Bottom Home, Trending disappear, actually it's behind tabBar.

1st Screen ========

simulator screen shot 25-may-2017 10 48 26 am

2nd Screen ========= simulator screen shot 25-may-2017 10 48 55 am

can you help to fix this?

thanks in advance.

fastred commented 7 years ago

Hey, can you see if this helps?

If you're having problems with a UINavigationController inside of a UITabBarController that is causing the UITabBar to pop out of view during the animation process, you'll want to implement the SloppySwiperDelegate protocol and return NO for calls to -(BOOL)sloppySwiperShouldAnimateTabBar:(SloppySwiper *)swiper.

kuldeep13990 commented 7 years ago

@fastred , I add SloppySwiperDelegate protocol and its method but it's not getting called.

fastred commented 7 years ago

Did you set yourself as a delegate on SloppySwiper instance?

kuldeep13990 commented 7 years ago

@fastred yes I set it like this.

self.swiper = [[SloppySwiper alloc] initWithNavigationController:self.navigationController]; self.navigationController.delegate = self.swiper;

fastred commented 7 years ago

No, it's the other way around:

self.myObject = self.swiper.delegate;
kuldeep13990 commented 7 years ago

@fastred I am not getting how to call it?

what's self.myObject? is it VC, Navigation or anything else?

fastred commented 7 years ago

I don't know how your app is set up. It can be any object that conforms to SloppySwiperDelegate protocol.

kuldeep13990 commented 7 years ago

@fastred actually I am not getting what you try to tell me, my base controller is navigation controller.

kuldeep13990 commented 7 years ago

@fastred , how can I fix this TabBar issue? MY ViewController Hierarchy. UINavigationController --> UITabbarController