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

Objective-C version #18

Open
rabehssera opened this issue Dec 19, 2016 · 7 comments
Open

Objective-C version #18

rabehssera opened this issue Dec 19, 2016 · 7 comments
Labels

Comments

@rabehssera
Copy link

Hi

I got trouble adding this library to my objective-c project. When I do, I get the "Use of @import" alert.

Any help ?

@AlexIzh
Copy link

AlexIzh commented Dec 19, 2016

How did you add this library to your project?
You can just drag&drop /Scratch&See/Classes/MDScratchImageView folder in your project. These classes are written on Objective-C, so, you shouldn't have any problems.

@rabehssera
Copy link
Author

rabehssera commented Dec 19, 2016

I copied the exact folder.

When I launch a Build, I get the error : "Use of '@import' when modules are disabled".
If I delete the folder, the Build works perfectly.

The files containing @import are in Pods files, so I can't correct them myself.

@AlexIzh
Copy link

AlexIzh commented Dec 19, 2016

So, do you try to declare MDScratchImageView through @import keyword? If so, are you sure that modules are enabled in your project and these files(MDScratchImageView and MDMatrix) are contained in separate library/project?
If not, you just should paste #import "MDScratchImageView.h" in your class where you want to use it.

@rabehssera
Copy link
Author

I don't try to import the library anywhere for now.

The @import are "@import CoreKit" and "@import UIKit" in other files.

@AlexIzh
Copy link

AlexIzh commented Dec 19, 2016

And your project is being compiled successfully and modules are disabled? Are "link frameworkks automatically" enabled? Which Xcode version do you use? If modules are disabled in project, then you can't use @import. Also, this library requires to use "line framework automatically" or links to "UIKit" and "CoreGraphics" manually in project (in Build Phases)

@rabehssera
Copy link
Author

When I don't have the library in the project, it compiles correctly.
Link Framework Automatically is at YES
I use Xcode 8.1

Modules are enabled ("Allow non-modular includes..." is at NO, the rest is at YES).

@georgesjamous
Copy link

There hasn't been any new comments in a while here, and I am having the same problem.
@rabehssera did you find a solution for this yet ?

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

No branches or pull requests

3 participants