Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown class RAMAnimatedTabBarItem in Interface Builder File

I'm attempting to add an external library written in Swift to my Objective-C project. The library is here:

https://github.com/Ramotion/animated-tab-bar

I followed their instructions by adding the RAMAnimatedTabBarController to my project, then modifying my `Tab Bar controller , Tab Bar items to utilize the custom class in the storyboard.

It keeps crashing with unknown class messages in the logs, so even though autocomplete on the custom class worked, it clearly can't see/compile the project files:

2015-05-01 14:59:26.309 <project>[xxxx:xxxxx] Unknown class RAMAnimatedTabBarItem in Interface Builder file.
2015-05-01 14:59:26.350 <project>[xxxx:xxxxx] Unknown class RAMAnimatedTabBarController in Interface Builder file.
2015-05-01 14:59:26.353 <project>[xxxx:xxxxx] Unknown class RAMBounceAnimation in Interface Builder file.

I've read a bunch of stuff about including swift header files in order to interchange using objc and swift in your projects, but they mention importing into your ViewController classes (of which I don't have since TabBar and NavController are only in the storyboard).

How to access both Objective-C and Swift classes from same storyboard?

Still pretty new with storyboards and I feel like I'm missing a critical piece here. Help!

like image 400
0xMatthewGroves Avatar asked May 01 '15 22:05

0xMatthewGroves


1 Answers

I managed to get it working...

  1. Set Tab Bar controller to RAMAnimatedTabBarController
  2. Select tab bar item > Identity Inspector and set class to RAMAnimatedTabBarItem and module to RAMAnimatedTabBarController
  3. Drag in your object and hook it up as per the video tutorial here: http://vimeo.com/112390386
  4. Click the object and set class to (anything you want, e.g. RAMBounceAnimation) and ensure the module is RAMAnimatedTabBarController

Also make sure :

  • setting the module in the identity inspector on the animation object
  • you set a duration on the object attribute inspector and press enter
  • Setting module to RAMAnimatedTabBarController

enter image description here

like image 129
Mohsen Sedaghat Fard Avatar answered Oct 05 '22 06:10

Mohsen Sedaghat Fard