Request rating by 1-5 stars.
- iOS 13+
JXReviewController is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'JXReviewController'
-
Present a
JXReviewController
instance from your view controller.import JXReviewController class ViewController: UIViewController { func requestReview() { let reviewController = JXReviewController() reviewController.image = UIImage(systemName: "app.fill") reviewController.title = "Enjoy it?" reviewController.message = "Tap a star to rate it." reviewController.delegate = self present(reviewController, animated: true) } }
-
Receive feedbacks by implimenting
JXReviewControllerDelegate
.extension ViewController: JXReviewControllerDelegate { func reviewController(_ reviewController: JXReviewController, didSelectWith point: Int) { print("Did select with \(point) point(s).") } func reviewController(_ reviewController: JXReviewController, didCancelWith point: Int) { print("Did cancel with \(point) point(s).") } func reviewController(_ reviewController: JXReviewController, didSubmitWith point: Int) { print("Did submit with \(point) point(s).") } }
Jianqiu Xiao, [email protected]
JXReviewController is available under the MIT license. See the LICENSE file for more info.