Reputation: 4487
I imported this PRTween library to my project.
Here are the source codes:
But it cant compile and gives me a lot of error
I really have no idea why is this happening because I have no experience with Objective C before.
Upvotes: 1
Views: 1479
Reputation: 1827
PRTween.h is missing #import <UIKit/UIKit.h>
. After adding that, these errors and warnings went away.
Upvotes: 4
Reputation: 80811
When the compiler warns you that:
No visible @interface for X
Chances are you're just forgetting to import the header file that contains this class.
In your case, you will want to import both Foundation.h
and CoreGraphics.h
:
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
OR
You might be import looping. Say you have fileA.h
and fileB.h
, if fileA.h
imports fileB.h
and fileB.h
imports fileA.h
, then the compiler will get stuck in an import loop, usually causing it to flag up completely unrelated errors about missing @interfaces.
Have a careful look back through your headers and make sure you're not import looping. If you are, you probably just want to move one of the file imports from the .h
to the .m
or completely re-think your dependancy structure.
Upvotes: 1