3

在应用程序中,我声明了一个 Category `

#import <Foundation/Foundation.h>


@interface UIImage (StackBlur) // Expected method body
- (UIImage*) stackBlur:(NSUInteger)inradius ;
-(UIImage*)mergeImage:(UIImage*)firstImage eggShape:(UIImage*)secondImage rect:(CGRect)rect;
-(UIImage*)maskImage:(UIImage*)firstImage ;
@end

it shows error at commented line. Please help. here is implementation code

#import "UIImage+StackBlur.h"


@implementation  UIImage (StackBlur)




- (UIImage*) stackBlur:(NSUInteger)inradius 
{


    return finalImage;
}
-(UIImage*)mergeImage:(UIImage*)firstImage eggShape:(UIImage*)secondImage rect:(CGRect)rect {
   return theImage;
}
- (UIImage*) maskImage:(UIImage *)image {

    return theImage;
}
@end

`

4

1 回答 1

3

UIImage是 的一部分UIKit,所以#import <UIKit/UIKit.h>不是<Foundation/Foundation.h>

#import <UIKit/UIKit.h>

@interface UIImage (StackBlur)
- (UIImage*) stackBlur:(NSUInteger)inradius ;
-(UIImage*)mergeImage:(UIImage*)firstImage eggShape:(UIImage*)secondImage rect:(CGRect)rect;
-(UIImage*)maskImage:(UIImage*)firstImage ;
@end
于 2012-07-20T09:12:20.803 回答