Sandroid
Sandroid

Reputation: 328

Expected Method Body Error in XCODE

In a application I have declared a 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

`

Upvotes: 3

Views: 2814

Answers (1)

trojanfoe
trojanfoe

Reputation: 122458

UIImage is part of UIKit, so #import <UIKit/UIKit.h> rather than <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

Upvotes: 3

Related Questions