- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的 ViewController
有一个带 Promt 的 navigationBar
,我在它上面添加了一个自定义图像:
- (void)changeNavBar
{
UIImage *image = [UIImage imageNamed: @"logo_home.png"];
imageView = [[UIImageView alloc] initWithImage:image];
imageView.contentMode = UIViewContentModeLeft;
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"logo_home.png"] forBarMetrics:UIBarMetricsDefault];
imageView.frame = CGRectMake(0, 0, 320, 70);
[self.navigationController.navigationBar insertSubview:imageView atIndex:0];
self.navigationController.navigationBar.backItem.backBarButtonItem.tintColor = [UIColor blackColor];
}
但是当用户单击“发送电子邮件”按钮时,我创建了 MFMailComposeViewController
并以模态方式呈现它。
- (IBAction)emailPressed:(id)sender
{
NSString *emailTitle = event.title;
NSString *messageBody = [NSString stringWithFormat:@"%@ - %@", event.title, event.concertUrl.absoluteString];
MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init];
mc.mailComposeDelegate = self;
NSLog(@"subviews: %d", mc.navigationBar.subviews.count);
[mc setSubject:emailTitle];
[mc setMessageBody:messageBody isHTML:NO];
// Present mail view controller on screen
[self presentModalViewController:mc animated:YES];
}
MFMailComposeViewController
的导航栏在没有提示的情况下自动调整为正常的 navigationBar,但我以前 VC 中的自定义图像并没有消失。如何删除它并为我的 navigationBar 设置标准的黑色样式?
最佳答案
您已使用 UIAppearance 代理设置背景图像,这将影响应用中的每个导航栏。
改变
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"logo_home.png"] forBarMetrics:UIBarMetricsDefault];
与
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"logo_home.png"] forBarMetrics:UIBarMetricsDefault];
关于iphone - iOS - 从 MFMailComposeViewController 中删除 UIImageView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13646960/
我的应用程序处于横向模式。当我通过当前模型 View 调用 MFMailComposeViewController 时,它进入横向模式。我旋转设备并且 MFMailComposeViewControl
我使用 MFMailComposeViewController 在我的应用程序中发送邮件。但是,当当前邮件撰写 View Controller 时,所有导航按钮都被禁用(选择邮件地址屏幕中的后退按钮除
我使用MFMailComposeViewController向其他人发送邮件。单击按钮时,撰写表将打开,我可以输入收件人地址、主题、邮件正文。但点击发送按钮后,邮件页面没有关闭。 代码: if ([M
我正在尝试向我的应用程序添加电子邮件功能。我可以让 MFMailComposeViewController 正确显示并预填充其主题和正文,但由于某种原因,当用户单击导航栏中的“取消”或“发送”按钮时,
我正在使用 MFMailComposeViewController,一切看起来都很好。该类表明邮件已发送,但我从未在模拟器上设置过电子邮件,也不知道如何设置。那么如果发送了,它发送到哪个电子邮件服务器
if ([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *mailViewController
我尝试在我的应用程序中插入邮件工具......我的应用程序基于cocos2d引擎 工具栏(顶部 ->取消、发送...)可见,但我看不到 mfMailComposerViewController Vie
由于某种原因,发送和取消按钮没有出现,我什至在应用程序启动时将以下代码粘贴到 appdelegate 中的应用程序开头,但仍然无法正常工作。有谁可以帮忙吗,谢谢 mailController = [[
MFMailComposeViewController 只有英文版本吗!? 我正在考虑使用 MFMailComposeViewController 来处理从我的应用程序发送电子邮件的想法,但我需要它符
我根据API出示了MFMailComposeViewController,一般情况下,界面是正常的,但是我们应用程序的一些用户提示右上角的发送按钮是灰色的(它变成禁用)的问题,她不能按发送按钮,当然我
如何在不按 MFMailComposeViewController 中的“发送”或“取消”按钮的情况下关闭键盘?! 感谢您的帮助。 最佳答案 你能试试这个吗? UIWindow* keyWindow
我正在开发一个通用应用程序,我正在为 iOS6 编码。 我正在使用 imagePickerController 拍摄照片,然后使用 MFMailComposeViewController 将其作为附件
首先,我使用的是 XCode 4.0.2。 好的,这是我的问题。我可以为 MFMailComposerViewController 构建 Apple 示例程序并在模拟器中运行它(我知道它不会发送电子邮
我已经设置了MFMailComposeViewController,它在iPhone上正常工作,但是在iPad上崩溃了,并说: *** Terminating app due to uncaught
我正在使用 MFMailComposeViewController在具有以下代码的 View Controller 中: if !MFMailComposeViewController.canSend
目前我有一个 NSArray 的电子邮件,我打开一个 View 来结束所有这些电子邮件的电子邮件: MFMailComposeViewController *mailer = [[MFMailComp
我正在使用 MFMailComposeViewController在我的应用程序中撰写反馈电子邮件。 MFMailComposeViewController显示,但无法关闭。 用于打开MFMailCo
我已经按照 Swift Guide 完成了 MFMailComposeViewController() 的常规设置 https://developer.apple.com/library/prerel
我正在尝试在 Swift 中创建以下扩展: extension MFMailComposeViewController { convenience init(document: D
单击警报按钮时尝试使用 MFMailComposeViewController。但是当我单击警报按钮时, Controller 不会弹出。代码如下。我使用了扩展程序,并且在单击警报按钮时尝试调用 se
我是一名优秀的程序员,十分优秀!