我新的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