Saturday, January 1, 2011

Feedback Form: Easy to use in app email!

If you would like to know information about the devices your customers are using, this feedback form class will be helpful to you.  I've received several feedback emails from people, and it's been good to know what OS version the customer is running as well as the version of the app that person is using.

To use this class, you must drag and drop the FeedbackFormController.h/.m files into your project and add the MessageUI.framework to your project.  The classes themselves are documented with comments to make it easy to understand.

Three things:  First, your calling class must be a subclass of UIViewController!  Second, the UIViewController that will be the FeedbackForm parent needs to implement this delegate method:

-(void)messageControllerDismissed:(FeedbackFormController *)controller
 Finally, in order to initialize the class you must use this method:
-(id)initWithDelegate:(id)delegate
 and use your parent UIViewController instance as the parameter. The last part is easy! To send the mail, use the method
-(void)sendFeedbackEmail

Download a sample project here.

No comments:

Post a Comment