我是 Objective-C 的新手,我一生都无法克服错误,“没有选择器的类方法”
这是我的 .h 代码:
#import <UIKit/UIKit.h>
@interface PhotoCapViewController : UIViewController < UIImagePickerControllerDelegate, UINavigationControllerDelegate > {
UIImageView * imageView;
UIButton * choosePhotoBtn;
UIButton * takePhotoBtn;
}
@property (nonatomic, retain) IBOutlet UIImageView * imageView;
@property (nonatomic, retain) IBOutlet UIButton * choosePhotoBtn;
@property (nonatomic, retain) IBOutlet UIButton * takePhotoBtn;
- (IBAction)getPhoto:(id)sender;
+ (UIImage *)burnTextIntoImage:(NSString *)text :(UIImage *)img;
@end
这是我在 .m 中定义的函数
+ (UIImage *)burnTextIntoImage:(NSString *)text :(UIImage *)img {
...
return theImage;
}
这是我调用函数的方式
UIImage* image1 = [PhotoCapViewController burnTextIntoImagetext:text1 img:imageView.image];
任何帮助将不胜感激。谢谢。