Post

Replies

Boosts

Views

Activity

Reply to Guided Project-Apple Pie: How to use map method in place of loop?
var letters = currentGame.formattedWord.map { String($0) } Another way of writing that is var letters = currentGame.formattedWord.map { letter in return String(letter) } We're essentially taking each character ('letter') from formattedWord and initializing a String from that letter using String(letter) and by using the closure on map, we're creating a whole new String array that gets passed into letters. The first solution is just a short-hand syntax for the second one. I recommend looking into closures and array operations.
Jul ’21
Reply to Sending Email from SwiftUI
getting this same problem except I'm using ViewController as a MailComposerDelegate and it seems as soon as the mail composer is presented, I get that error. Like you said, I am still able to send the message successfully. Except, I'm unable to programmatically dismiss the mail composer, and have to swipe it away to dismiss it. I'm guessing that error means that my app doesn't even recognize that the composer is open.
May ’21