Composing Emails in SwiftUI Using A View Modifier

Gabriel Theodoropoulos
11 min readJun 17, 2021
Code snippet screenshot highlighting the topic of the article, containing the implementation of a Button in SwiftUI with title “Send Email” and of a custom view modifier called email composer that demonstrates the final result of this post.

Just a couple of weeks ago, I had discussed in this previous post about the MFMailComposeViewController; a class that allows to present and use a system provided view controller in order to compose and send emails through our own applications. The discussion on that post was around a UIKit based application explaining how that class works.

--

--

Gabriel Theodoropoulos

An iOS & macOS app maker writing code in Swift. Author of countless programming tutorials. Content creator. https://serialcoder.dev