0

I'm trying to implement a TabBarDelegate but I'm getting this error:

cannot find protocol declaration for UITabBarControllerDelegate

I add an NSObject class:

@interface tabBarDelegate : NSObject <UITabBarControllerDelegate>

any of you knows why I'm getting this error? or how resolve this error?

I'll really appreciate your help.

1
  • Did you remember to @import UIKit;? Commented Jul 14, 2015 at 19:26

1 Answer 1

1

The error is telling you that a declaration couldn't be found for the protocol UITabBarControllerDelegate.

So solve this, you need to be sure to import UIKit (the framework in which the protocol is declared).

@import UIKit;

Or, if all you need to access from UIKit in this file is the UITabBarControllerDelegate, you have the option of only importing UITabBarController's declarations.

@import UIKit.UITabBarController;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.