2012-01-31 10 views
0

ランダムイメージボタンを作成するアプリケーションを作成しようとしていますが、そのコードは機能します。私のアプリが画像を生成するとき、スクリーンショットを添付した電子メールを送ることができるボタンを作成したいと思います...私は両方のアクションのコードを知っていますが、それらをコントローラhとmに入れて、多くのエラー...私を助けてください!Xcodeランダムイメージボタンと電子メールボタン

@interface __3_ProductionsViewController : UIViewController 

<MFMailComposeViewControllerDelegate> 

-(IBAction)openMail:(id)sender; 
-(IBAction)randomimagebutton; 

{ 


    IBOutlet UIImageView *imageview; 

} 


@end 
+0

への接続を使用してIBActionsを接続する必要があります – MobileOverlord

答えて

0

エラーによっては、書式を少し並べ替えることができます。これは私がhとmを宣言する方法です。

// __3_ProductionsViewController.h 

#import <MessageUI/MessageUI.h> 
#import <MessageUI/MFMailComposeViewController.h> 
@interface __3_ProductionsViewController : UIViewController 
<MFMailComposeViewControllerDelegate> 

@property (nonatomic, retain) IBOutlet UIImageView *imageview; 
-(IBAction)openMail:(id)sender; 
-(IBAction)randomimagebutton:(id)sender; 

@end 

// __3_ProductionsViewController.m 

#import "__3_ProductionsViewController.h" 
@implementation UpdateViewController 
@synthesize imageView; 

-(IBAction)openMail:(id)sender { 

} 
-(IBAction)randomimagebutton:(id)sender { 

} 
@end 

あなたが取得しているエラーを投稿することができますあなたは、インターフェイスビルダーと同様にドラッグあなたimageView

関連する問題