Latest 2.0.0
License MIT
Platforms ios 9.0

ADNetPromoterScoreSurvey is an iOS component that presents Net Promoter Score (NPS) survey dialog to the user.



  • Popup NPS survey dialog
  • Callbacks on user interaction
  • Final callback with user score, promoter type and feedback
  • Customize the dialog’s UI with your own style.

Support and requirements

  • iOS 9 and higher
  • Swift 4
  • Supports iPhone X


Cocoapods (Version 1.4.0 or later)

pod 'ADNetPromoterScoreSurvey'

Getting started

Create ADNetPromoterScoreSurvey member

var npsSurvery = ADNetPromoterScoreSurvey()

Show The survey

Just call showSurvey function view controller whenever you want to show the survey:

self.npsSurvery.showSurvey(onViewController: self)

Delegate Methods

Implement NetPromoterScoreSurveyDelegate to get survey results and user interaction callbacks

self.npsSurvery.delegate = self

Implementing NetPromoterScoreSurveyDelegate protocol:

All delegate methods are optional:

@objc optional func netPromoterScoreViewDidChange(_ npsSurvey: ADNetPromoterScoreSurvey,
                                                       toView: NetPromoterScoreViewType)

Implement this method to receive a callback when survey view changed.
toView will hold the active view type (scoreQuestionView, feedbackQuestionView, thankYouView)

@objc optional func netPromoterScoreDidPressSendScore(_ npsSurvey: ADNetPromoterScoreSurvey,
                                                    selectedScore: Int)

Implement this method to receive a callback when the user click on "Send" Button after selecting score in the Score Question View.

@objc optional func netPromoterScoreDidChangeScoreValue(_ npsSurvey: ADNetPromoterScoreSurvey,
                                                      newScoreValue: Int)

Implement this method to receive a callback when the user change the score in the Score slider.

@objc optional func netPromoterScoreDidPressEditScore(_ npsSurvey: ADNetPromoterScoreSurvey)

Implement this method to receive a callback when the user back to edit score from the "Feedback View"

@objc optional func netPromoterScoreSurveryCompleted(_ npsSurvey: ADNetPromoterScoreSurvey,
                                                    surveyResult: NPSResult)

Implement this method to receive a callback when the survey proccess completed and get the whole survey result.
surveyResult parameter provides summary of the survey result (score, feedback, promoterType).

@objc optional func netPromoterScoreDidPressClose(_ npsSurvey: ADNetPromoterScoreSurvey,
                                                     fromView: NetPromoterScoreViewType)

Implement this method to receive a callback when the user closes the survey. fromView will hold the view type that was active when the user closed the survey.

Custom Appearance

In order to use you custom texts and fonts you can change the appearnce of the survey.

Changing text:

self.npsSurvery.appearance.scoreQuestionViewAppearance.questionText = "My custom question text" 

Changing font:

self.npsSurvery.appearance.feedbackQuestionViewAppearance.textFieldFont = UIFont(name: "My Custom Font Name", size: 14)

Changing colors:

self.npsSurvery.appearance.scoreQuestionViewAppearance.highRankTitleColor =
self.npsSurvery.appearance.feedbackQuestionViewAppearance.titleFontColor =
self.npsSurvery.appearance.thankYouViewAppearance.backgroundColor  =

Example Project

  1. Clone the repository to your local environment
  2. Go to dir NetPromoterScoreSurveyExample
  3. Execute pod install
  4. Open Xcode workspace NetPromoterScoreSurveyExample.xcworkspace
  5. Run

Change Log

See Change Log page.


See Contributing page.


Tomer Shalom

Latest podspec

    "name": "ADNetPromoterScoreSurvey",
    "version": "2.0.0",
    "summary": "An iOS Net Promoter Score Survey",
    "description": "Net Promoter or Net Promoter Score (NPS) is a management tool that can be used to gauge the loyalty of a firm's customer relationships. nIt serves as an alternative to traditional customer satisfaction research and claims to be correlated with revenue growth. nNPS has been widely adopted with more than two thirds of Fortune 1000 companies using the metric.",
    "homepage": "",
    "screenshots": [
    "license": "MIT",
    "authors": {
        "Tomer Shalom": "[email protected]"
    "social_media_url": "",
    "platforms": {
        "ios": "9.0"
    "source": {
        "git": "",
        "tag": "2.0.0"
    "source_files": "ADNetPromoterScoreSurvey/**/*.{h,m,swift}",
    "resources": "ADNetPromoterScoreSurvey/**/*.{xib,xcassets}",
    "swift_version": "4.0"

Pin It on Pinterest

Share This