我新的Objective-C和我的生活不能让过去的错误,“为选择无类法”在xcode中,如何调用返回值的类方法?
这里是我的.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];
任何帮助将不胜感激。谢谢。
什么问题呢? – 2012-08-08 06:13:42