Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting the subclass correctly #22

Closed
HackShitUp opened this issue Sep 5, 2017 · 8 comments
Closed

Setting the subclass correctly #22

HackShitUp opened this issue Sep 5, 2017 · 8 comments
Assignees

Comments

@HackShitUp
Copy link

For some reason, the animations aren't working? I think this might have to do something with one of my view controllers having a navigation controller. I'll see if I can get more info on this issue because it was working perfectly fine before I tampered with one of the view controllers on storyboard.

@marcosgriselli
Copy link
Owner

Hi @HackShitUp, animations should work even when the UIViewController is inside a UINavigationController but only for the first UIViewController on the navigation stack. This way it doesn't interfere with 'swipe to go back' native UIKit functionality.

@HackShitUp
Copy link
Author

@marcosgriselli yeah I assumed that a navigation controller has nothing to do with it. But for some reason, none of the animations work. The relationship view controllers recognize the pan gesture, it just doesn't perform the animation. Any suggestions on how to debug this?

@HackShitUp
Copy link
Author

@marcosgriselli I also realized that the transition works in the beginning but only when you tap the UITabBar. In other words:
(1) The app launches.
(2) When you tap on any of the UITabBars, the transition performs with the animation.
(3) When you tap or swipe from the transitioned view controller, the transition executes, but the animtion doesn't.

@marcosgriselli
Copy link
Owner

@HackShitUp It's working for me in the example app. Can you create a demo project with this error?

@marcosgriselli marcosgriselli self-assigned this Sep 14, 2017
@HackShitUp
Copy link
Author

@marcosgriselli sure, I'll see what I can do. I need to narrow down the scope of this project first, and that may take a while, but thank you!

@marcosgriselli marcosgriselli modified the milestone: 1.0.7 Sep 14, 2017
@HackShitUp
Copy link
Author

@marcosgriselli although I didn't include the scope of my own project using SwipeableTabBarController, I created a new one and was able to replicate it:

https://github.com/HackShitUp/SwipeIssue

@marcosgriselli
Copy link
Owner

marcosgriselli commented Sep 15, 2017

@HackShitUp I just reviewed the project you were missing setting your UITabBarController class on the storyboard to MasterUI.

That's also why any of the UI customization on the Master UI class wasn't working.

screen shot 2017-09-15 at 3 56 42 pm

@marcosgriselli marcosgriselli changed the title Animations not working. Setting the subclass correctly Sep 15, 2017
@HackShitUp
Copy link
Author

@marcosgriselli I realized I submitted the project carelessly without setting the storyboard's class. BUT I did figure out what prevented the animations.

If the relationship view controllers conform to the UITabBarControllerDelegate like so:

override func viewDidLoad() {
    super.viewDidLoad()
    
    navigationController?.tabBarController?.delegate = self
}

// MARK: - UITabBarControllerDelegate Method
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
// ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants