Make strings colored in MFMailComposer

60 views Asked by At

Hello everybody,

I have built the MFMailComposer in my app. Now I have inserted strings (see code) in the text to be later in the mail, which are defined by the user beforehand. Now to my question. I would like that the font color of the value of the strings in the mail should be red. How do I do that?

func showMailComposer() {
    
    guard MFMailComposeViewController.canSendMail() else {
        return
    }
    
    let composer = MFMailComposeViewController()
    composer.mailComposeDelegate = self
    composer.setToRecipients(["[email protected]"])
    composer.setSubject("Bewertung Tisch 1")
    composer.setMessageBody("""
    
    Teamname:
    \(String(describing: teamname.text))
    
    Runde:
    \(String(describing: runde.text))
    
    Zeit:
    \(String(describing: zeit.text))
    
    
    Gesamtpunktzahl:
    \(String(describing: punkteGesamt.text))
    
        
    """ , isHTML: false)

    present(composer, animated: true)
}
0

There are 0 answers