-2

the reason for me writing this post is because I want to create an email form in my iOS app that will allow people to fill out a simple form like this one. Email Form Layout In iOS App

Once you've filled out the form you'll click the 'Send Email' button which will then load up the mail app and it will have already filled out the form ready for you to send which should look something like this Email Form Filled Out In Mail App

I've been informed that if I use the method in the link down below that @Gabriel has provided I need to set the UITextFields delegate although for the life of me I don't know how to do this.

  • This is pretty common question, you should do some search before asking. Check out this answer: http://stackoverflow.com/a/1513433/634185. – Diogo T Apr 22 '14 at 21:34

1 Answers1

0

Make a UIViewController with the layout you need and on the action method of the "Send Mail" button use MFMailComposeViewController to set the mail sheet as you need it.

This is a great MFMailComposeViewController tutorial: http://www.appcoda.com/tag/mfmailcomposeviewcontroller/

Thats all you need! If you need any more guidance just ask!

Gabriel
  • 561
  • 5
  • 9
  • Hi @Gabriel, I'm still very lost in all of this. I don't understand why I need a custom UIAction sheet. It's so simple what I want to do although I just can't figure it out. I want to fill out the text fields, click a submit button and then the mail app will load up all filled out. – user3562037 Apr 24 '14 at 12:40
  • well, the UIAction sheet can be easily customised and displayed on top of another view, however I saw again the first picture and realized you are not overlaying anything as I thought you did first. So just (1) make a UIViewController with the things you need, (2) on the action method of the "Send Mail" button use the second tutorial I wrote above to use MFMailComposeViewController. This should be really simple. I modified my answer now, hope this helps you! – Gabriel Apr 25 '14 at 18:51
  • Hi @Gabriel I've set it out how I want it with the TextFields and I followed the tutorial although I now don't know how to make these two work together to be able to display what's in the TextFields in the email. It's the coding side of making the text fields work with that tutorial you sent me. – user3562037 Apr 28 '14 at 14:46