Change title color of navigation bar in MFMailComposeViewController in iOS 12 not working [duplicate]

/// UINavigationBar let navBarAppearance = UINavigationBar.appearance() navBarAppearance.barTintColor = .red navBarAppearance.tintColor = .white navBarAppearance.backgroundColor = .red navBarAppearance.titleTextAttributes = [ .foregroundColor: UIColor.white, .font: UIFont.systemFontSize ] navBarAppearance.largeTitleTextAttributes = [ .foregroundColor: UIColor.white, .font: UIFont.smallSystemFontSize ] let barButtonAppearance = UIBarButtonItem.appearance() barButtonAppearance.setTitleTextAttributes([.font: UIFont.systemFontSize], for: .normal) navBarAppearance.isTranslucent = false if #available(iOS 13.0, *) { let appearance = UINavigationBarAppearance() appearance.configureWithOpaqueBackground() appearance.backgroundColor = navBarAppearance.backgroundColor … Read more

ios: Application tried to present a nil modal view controller on target

As per Apple, You should check is MFMailComposeViewController are able to send your mail just before sending if ([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; [picker setSubject:@”Test mail”]; [picker setMessageBody:messageBody.text isHTML:YES]; [self presentViewController:picker animated:YES completion:NULL]; } Swift: if MFMailComposeViewController.canSendMail() else { // Send mail code } Ref : Apple Dev … Read more

SwiftUI: Send email

@Matteo’s answer is good but it needs to use the presentation environment variable. I have updated it here and it addresses all of the concerns in the comments. import SwiftUI import UIKit import MessageUI struct MailView: UIViewControllerRepresentable { @Environment(\.presentationMode) var presentation @Binding var result: Result<MFMailComposeResult, Error>? class Coordinator: NSObject, MFMailComposeViewControllerDelegate { @Binding var presentation: PresentationMode … Read more

How to add a UIImage in MailComposer Sheet of MFMailComposeViewController

Back again with a new answer. I’m still leaving my previous code up though, because I’m still not convinced that there’s not a way to make use of it. I’ll keep at it myself. The following code DOES work. Mustafa suggests base64 encoding the images, and says that they only work Apple to Apple, but … Read more

MFMailComposeViewController in iOS 7 statusbar are black

Set the UIApplication statusBarStyle in the completion block of presentViewController for your MFMailComposeViewController. i.e. MFMailComposeViewController *mailVC = [[MFMailComposeViewController alloc] init]; [self.navigationController presentViewController:mailVC animated:YES completion:^{ [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; }]; You may also need to add and/or set “View controller-based status bar appearance” to NO in your Info.plist file.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)