我试图截取屏幕截图并使用邮件编辑器发送电子邮件.一切都很好,除了邮件作曲家不会解散.这篇文章似乎有同样的问题,但提供的解决方案对我不起作用.无法解除iPhone中的电子邮件作曲家视图?
- (IBAction)Email:(id)sender {
UIGraphicsBeginImageContext(self.view.frame.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSData * imageData = UIImageJPEGRepresentation(image, 1.0);
if ( [MFMailComposeViewController canSendMail] ) {
MFMailComposeViewController * mailComposer = [[[MFMailComposeViewController alloc] init] autorelease];
mailComposer.delegate = self;
[mailComposer setSubject:@"Risk Assessment"];
[mailComposer addAttachmentData:imageData mimeType:@"image/jpeg" fileName:@"attachment.jpg"];
[self presentModalViewController:mailComposer animated:YES];
}
}
Run Code Online (Sandbox Code Playgroud)
上面的代码效果很好.我怎么称呼这个底部.似乎编译器只是跳过了它.
-(void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error{
if (error){
NSString *errorTitle = @"Mail Error";
NSString *errorDescription = [error localizedDescription];
UIAlertView *errorView = [[UIAlertView alloc]initWithTitle:errorTitle message:errorDescription delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
[errorView show];
[errorView …Run Code Online (Sandbox Code Playgroud) 我正在访问 2007 中构建报告,并尝试根据文本框中字符串的值将复选框设置为 true。例如:如果 txtBoxValue = "Injury" then chkBoxValue = True(Checked) Else chkBoxValue = False(unchecked)。
这是我在 chkBoxValue 的源代码管理中拥有的值。
=IIf([txtBoxValue]=”Injury”,1,0)
Run Code Online (Sandbox Code Playgroud)
我是 VBA 的新手,任何帮助将不胜感激。
是否可以在MS Access 2007中创建不依赖于记录集的表单?我想创建一个只处理简单计算的表单,但不依赖于数据库中的任何数据.
这是我尝试使用的代码,但是当我运行它时,我收到编译错误"找不到方法或数据成员".
Private Sub btnCalc_Click()
Dim TotalCost As Integer
Dim DisposalCost As Integer
Dim CostRatio As Integer
TotalCost = txtTotalCost.Text
DisposalCost = txtDisposalCost.Text
CostRatio = TotalCost / DisposalCost
lblCostRatio.Text = CostRatio
End Sub
Run Code Online (Sandbox Code Playgroud)
我的代码有问题,还是我需要创建一个winform来处理这个问题?
我在访问表单上有一个文本框,如果文本框为空,我想启用edditing.我是VBA的新手,并且不确定最好的方法.使用双击事件对我来说没问题,但我更愿意在加载时进行.
我尝试了以下代码,但似乎无法让它工作.任何帮助,将不胜感激.
Private Sub EmpID_DblClick(Cancel As Integer)
If EmpID.Text = "" Then
Me.EmpID.Enabled = True
End If
End Sub
Run Code Online (Sandbox Code Playgroud)