SwiftyFeedback 1.0.2

SwiftyFeedback 1.0.2

Maintained by Juan Pablo Fernandez.



SwiftyFeedback

A lightweight pure-Swift library that allows users to send feedback.

Swift Version Build Status License CocoaPods Platform

SwiftyFeedback is a lightweight pure-Swift library based on the CTFeedback library.

SwiftyFeedback makes it easy to add a simple feedback template to any of your apps.

Contents

Requirements

  • iOS 9.0+
  • Xcode 7.3+
  • Swift 4.0+

Installation

CocoaPods

You can use CocoaPods to install SwiftyFeedback by adding this to your Podfile:

use_frameworks!
pod 'SwiftyFeedback'

If you get the Unable to find a specification for `SwiftyFeedback`. error after running pod install.

Run the following commands on your project directory:

pod repo update
pod install

Manually

  1. Drag and drop SwiftyFeedback.swift and the rest of the .swift files into your project.
  2. That's it!

Usage

  1. Import SwiftyFeedback module to your AppDelegate class
import SwiftyFeedback
  1. In your AppDelegate class, add the recipients array to the SwiftyFeedback singleton.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        SwiftyFeedback.shared.recipients = ["[email protected]"]
        return true
}
  1. Import SwiftyFeedback module to your ViewController class
import SwiftyFeedback
  1. Present the SwiftyFeedback view on your ViewController e.g.
class ViewController: UIViewController {

        @IBAction func contactTapped(_ sender: Any) {
            SwiftyFeedback.shared.present(self)
        }
}
  1. SwiftyFeedback works with default implementation. Override it to customize its behavior

Notes

  • Landscape mode is not supported

Contribute

Contributions are welcomed! There are however certain guidelines you must follow when you contribute:

  • Have descriptive commit messages.
  • Make a pull request for every feature (Don't make a pull request that adds 3 new features. Make an individual pull request for each of those features, with a descriptive message).
  • Don't update the example project, or any other irrelevant files.

License

Distributed under the MIT license. See LICENSE for more information.