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

Open
opened 2025-12-29 18:29:03 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/UrbanApps/Armchair/pull/27
Author: @ibru
Created: 11/11/2015
Status: 🔄 Open

Base: masterHead: master


📝 Commits (3)

  • f272e80 Added possibility to define custom rating prompt instead of default alert view
  • 60c9cb8 Made ratingConditionsHaveBeenMet() function be exposed to public interface
  • 023a7e9 Fix sending multiple times didDisplayAlertClosure

📊 Changes

1 file changed (+182 additions, -68 deletions)

View changed files

📝 Source/Armchair.swift (+182 -68)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/UrbanApps/Armchair/pull/27 **Author:** [@ibru](https://github.com/ibru) **Created:** 11/11/2015 **Status:** 🔄 Open **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`f272e80`](https://github.com/UrbanApps/Armchair/commit/f272e80af3502a1f9312268976243c9dc9e93e10) Added possibility to define custom rating prompt instead of default alert view - [`60c9cb8`](https://github.com/UrbanApps/Armchair/commit/60c9cb8ed9f3914c18d40a9d4f855577334156ff) Made ratingConditionsHaveBeenMet() function be exposed to public interface - [`023a7e9`](https://github.com/UrbanApps/Armchair/commit/023a7e9f289061b72f4175322ee12a9c63e1d619) Fix sending multiple times didDisplayAlertClosure ### 📊 Changes **1 file changed** (+182 additions, -68 deletions) <details> <summary>View changed files</summary> 📝 `Source/Armchair.swift` (+182 -68) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 18:29:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Armchair#93