Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xcode随机图像按钮和电子邮件按钮_Xcode_Image_Button_Random_Mfmailcomposeviewcontroller - Fatal编程技术网

Xcode随机图像按钮和电子邮件按钮

Xcode随机图像按钮和电子邮件按钮,xcode,image,button,random,mfmailcomposeviewcontroller,Xcode,Image,Button,Random,Mfmailcomposeviewcontroller,我正在尝试创建一个应用程序,创建一个随机图像按钮,代码可以正常工作。当我的应用程序生成图像时,我想创建一个按钮,从中我可以发送一封附有屏幕截图的电子邮件…我知道这两个操作的代码,但当我将它们放在控制器h和m中时,我有很多错误…请帮助我 @interface __3_ProductionsViewController : UIViewController <MFMailComposeViewControllerDelegate> -(IBAction)openMail:(id)s

我正在尝试创建一个应用程序,创建一个随机图像按钮,代码可以正常工作。当我的应用程序生成图像时,我想创建一个按钮,从中我可以发送一封附有屏幕截图的电子邮件…我知道这两个操作的代码,但当我将它们放在控制器h和m中时,我有很多错误…请帮助我

@interface __3_ProductionsViewController : UIViewController 

<MFMailComposeViewControllerDelegate>

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

{


    IBOutlet UIImageView *imageview;

}


@end
@interface\uuuu 3\u产品视图控制器:UIViewController
-(iAction)openMail:(id)发送方;
-(iAction)随机图像按钮;
{
IBUIImageView*imageview;
}
@结束

根据您遇到的错误,您可能需要重新安排一下格式。这就是我将如何声明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
/\uuuu3\uProductionsViewController.h
#进口
#进口
@界面uu 3_产品视图控制器:UIViewController
@属性(非原子,保留)IBUIImageView*imageview;
-(iAction)openMail:(id)发送方;
-(iAction)随机图像按钮:(id)发送方;
@结束
//_uuu3_ProductionsViewController.m
#导入“\uuu3\uProductionsViewController.h”
@实现UpdateViewController
@综合图像视图;
-(iAction)openMail:(id)发件人{
}
-(iAction)随机图像按钮:(id)发送者{
}
@结束

您需要使用interface builder连接
iActions
,并将连接拖动到
imageView

是否可以发布您收到的错误