Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding possibility present prompt with custom UI + exposed ratingConditionsHaveBeenMet() func to public interface #27

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ibru
Copy link

@ibru ibru commented Nov 11, 2015

I've introduced new property ratingPrompt and a protocol ArmchairRatingPrompt which defines how rating prompt is shown. And provided 2 default implementation for UIlAlertView and UIAlertController.

Default implementation works exactly same as before (tested on Example app). You can specify your own prompt UI like this:

let feedbackPrompt = MyFeedbackRatingPrompt(delegate: Armchair.defaultRatingPromptDelegate)
Armchair.ratingPrompt(feedbackPrompt)

-----

class MyFeedbackRatingPrompt : ArmchairRatingPrompt {
    // controls custom rating prompt UI
}

I'm not familiar with OS X development so I made the code iOS only. Didn't want to mess up OS X code.

I can also update iOS Example app to include example of using custom rating UI, if you want.

I also needed to know if rating conditions have been met, so I introduced new static func which exposes private ratingConditionsHaveBeenMet() to public.

@ibru ibru changed the title Adding possibility present prompt with custom UI + exposed ratingConditionsHaveBeenMet func to public interface Adding possibility present prompt with custom UI + exposed ratingConditionsHaveBeenMet() func to public interface Nov 11, 2015
@coneybeare
Copy link
Member

I can't add this without OS X, but I don't really have time to look into it at the moment. You may find it is not too hard to add it to the OS X code as the language is the same and API's are similar. Consult the example project.

@phimage
Copy link
Contributor

phimage commented Dec 15, 2015

I make on @ibru repository a PR for OSX ibru#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants