Ramotion / animated-tab-bar

:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion
https://www.ramotion.com/animated-tab-bar-ios-app-development-ui-library/
MIT License
11.12k stars 1.33k forks source link

Crash & Potential Import Issue #269

Closed thejeff77 closed 4 years ago

thejeff77 commented 4 years ago

This is either a question or a bug report, I'm not sure which one.

XCode 11.2 GE Swift 5.1.1

Crash on this line:

        guard let items = tabBar.items as? [RAMAnimatedTabBarItem] else {
            fatalError("items must inherit RAMAnimatedTabBarItem")
        }

I've tried making my tab bar items in the storyboard derive from RAMAnimatedTabBarItem, and it doesn't auto-complete in the storyboard, which is odd. I see this failing on the fatalError line.

I've also tried setting the subclass in the storyboard to a custom class deriving from RAMAnimatedTabBarItem and that doesn't do the trick either.

I've followed the standard carthage setup instructions as I've done with other libraries, and compared my storyboard setup to the demo application, and I'm still not sure what's up.

Thanks for any help or feedback.

thejeff77 commented 4 years ago

Seemed that importing this library as a swift package and restarting xcode did the trick. I know it works in the storyboard now because it auto-completes, and selects the imported module.