Xcode 随机图像按钮和电子邮件按钮
我正在尝试创建一个创建随机图像按钮的应用程序,并且代码有效。当我的应用程序生成图像时,我想创建一个按钮,我可以通过该按钮发送附有屏幕截图的电子邮件...我知道这两个操作的代码,但是当我将它们放入控制器 h 和 m 时,我'有很多错误...请帮助我!
@interface __3_ProductionsViewController : UIViewController
<MFMailComposeViewControllerDelegate>
-(IBAction)openMail:(id)sender;
-(IBAction)randomimagebutton;
{
IBOutlet UIImageView *imageview;
}
@end
I'm trying to create an app that creates a random image button, and the code works. when my app generates an image, I'd like to create a button from which i can send an email with the screenshot attached...i know the codes for both actions, but when i put them in the controller h and m I've many errors...please help me!
@interface __3_ProductionsViewController : UIViewController
<MFMailComposeViewControllerDelegate>
-(IBAction)openMail:(id)sender;
-(IBAction)randomimagebutton;
{
IBOutlet UIImageView *imageview;
}
@end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您收到的错误,您可能需要稍微重新安排格式。这就是我声明 h 和 m 的方式。
您需要使用界面生成器连接
IBActions
,并将连接拖动到您的imageView
Depending on the errors you are getting you might want to rearrange your formatting a little. This is how I would declare the h and m.
You'll need to connect the
IBActions
using interface builder as well as drag a connection to yourimageView