Home

Awesome

RPInteraction

Version License Platform Build Status

demo

Overview

Review page interaction - handy and pretty way to ask for review. Inspired by dribbble shot.

Requirements

Installation

RPInteraction is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'RPInteraction'

Usage

@import RPInteraction;

RPViewController *vc = [RPViewController new];

[vc onConfirmHandler:^(RPRate rate) {
    switch (rate) {
        case RPRateBad:
            titleLabel.text = @"BAD";
            break;
        case RPRateUgh:
            titleLabel.text = @"UGH";
            break;
        case RPRateOk:
            titleLabel.text = @"OK";
            break;
        case RPRateGood:
            titleLabel.text = @"GOOD";
            break;
    }
    [self dismissViewControllerAnimated:YES completion:nil];
}];

[vc onCancelHandler:^{
    [self dismissViewControllerAnimated:YES completion:nil];
}];

[self presentViewController:vc animated:YES completion:nil];

Available properties

PropertyTypeDefault Value
rateTitleNSStringHow was your experience with us?
badTitleNSStringBAD
ughTitleNSStringUGH
okTitleNSStringOK
goodTitleNSStringGOOD
confirmTitleNSStringSUBMIT
rateTitleFontUIFont[UIFont systemFontOfSize:24]
confirmTitleFontUIFont[UIFont systemFontOfSize:24]
backgroundColorUIColor#FFFFFF
closeIconColorUIColor#656565
rateTitleColorUIColor#656565
reelTitleColorUIColor#FFFFFF
confirmTitleColorUIColor#FFFFFF
badTitleColorUIColor#FE5C6E
ughTitleColorUIColor#F6BC7E
okTitleColorUIColor#28CDFC
goodTitleColorUIColor#41F8C7
badStartGradientColorUIColor#FE0D46
badEndGradientColorUIColor#FEAD96
ughStartGradientColorUIColor#F9D975
ughEndGradientColorUIColor#F39F86
okStartGradientColorUIColor#12E6F9
okEndGradientColorUIColor#41B0FD
goodStartGradientColorUIColor#3EE882
goodEndGradientColorUIColor#3DF9CF

Example Project

An example project is included with this repo. To run the example project, clone the repo, and run pod install from the Example directory first.

Author

nbolatov, nurda.bolatov@gmail.com

License

RPInteraction is available under the MIT license. See the LICENSE file for more info.