Skip to content

imthegiga/TGShakeToFeedback

Repository files navigation

TGShakeToFeedback

Library which opens mail composer upong shake gesture. It will prompt with current app screen where user performed the guesture & attach it.

Pod

pod 'TGShakeToFeedback'

Requirements

* iOS 8+
* Swift 5

Usage

From your any ViewController customise mailData & feedbackData e.g.

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
    mailData.toRecipients = ["[email protected]"]
    mailData.bodyAsAttachment = true //If true the message will be sent as an attachment instead of an email body
    feedbackData.message = "This feedback loaded from ViewController class. Do you want to proceed?"
}

Below variables are available for customization. If you don't set anything, the default values will be considered.

For mailData variable (MailData struct)

  • mailNotAvailableText
  • subject
  • body
  • isHTML
  • toRecipients
  • ccRecipients
  • bccRecipients
  • bodyAsAttachment

For feedbackData variable (FeedbackData struct)

  • title
  • message
  • cancelButtonTitle
  • defaultButtonTitle

In case you don't want to attach a screenshot, and open only mail composer; you can call showMailVC function directly

Screenshots

1 2 3

Contact

Feel free to connect if you need any help 😃

About

Shake phone to feedback with current screen

Resources

License

Stars

Watchers

Forks

Packages

No packages published