Sample Project: http://cl.ly/1I0c2E3D0x1z
I'm a little confused. I want to use Apple's image blurring library in my Swift project, but it seems like adding the .h and .m, putting the .h in my bridging header and compiling isn't sufficient.
It gives me tons of error (actually stops reporting them eventually) at compile time, the first bunch saying "Expected a type" and taking issue with UIImage
.
What am I doing wrong?
The problem is that the compiler doesn't recognize UIImage
.
That is because you only import Foundation
but UIImage
is declared in UIKit
.
Change line 50 in the UIImageEffects.h
from
#import <Foundation/Foundation.h>
to
@import UIKit;
After that the projects builds without any problems!
In your Objective-C projects you most probably imported UIKit
in your .pch
precompiled headers file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With