From c7340e1c1a57fba37c81d39cf210207350ccdb1c Mon Sep 17 00:00:00 2001 From: Dominic Tham Date: Wed, 10 Apr 2013 14:04:32 -0700 Subject: [PATCH] Added method to show the enjoyment dialog if requirements are met. Without having to increment the significant event count. --- ApptentiveConnect/source/Rating Flow/ATAppRatingFlow.h | 6 ++++++ ApptentiveConnect/source/Rating Flow/ATAppRatingFlow.m | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/ApptentiveConnect/source/Rating Flow/ATAppRatingFlow.h b/ApptentiveConnect/source/Rating Flow/ATAppRatingFlow.h index 190a7da5c..e30d82c1c 100644 --- a/ApptentiveConnect/source/Rating Flow/ATAppRatingFlow.h +++ b/ApptentiveConnect/source/Rating Flow/ATAppRatingFlow.h @@ -94,6 +94,12 @@ */ - (void)showEnjoymentDialog:(UIViewController *)vc; +/*! + Call if you want to show the enjoyment dialog if requirments are met. This + enters the flow for either bringing up the feedback view or the rating dialog. + */ +- (void)showEnjoymentDialogIfRequirementsMet:(UIViewController *)vc; + /*! Call if you want to show the rating dialog directly. */ diff --git a/ApptentiveConnect/source/Rating Flow/ATAppRatingFlow.m b/ApptentiveConnect/source/Rating Flow/ATAppRatingFlow.m index 6edf31ea4..ad78ed7ad 100644 --- a/ApptentiveConnect/source/Rating Flow/ATAppRatingFlow.m +++ b/ApptentiveConnect/source/Rating Flow/ATAppRatingFlow.m @@ -219,6 +219,16 @@ - (IBAction)showEnjoymentDialog:(id)sender #endif } +#if TARGET_OS_IPHONE +- (void)showEnjoymentDialogIfRequirementsMet:(UIViewController *)vc{ + self.viewController = vc; + BOOL showedDialog = [self showDialogIfNecessary]; + if (!showedDialog) { + self.viewController = nil; + } +} + +#endif #if TARGET_OS_IPHONE - (void)showRatingDialog:(UIViewController *)vc #elif TARGET_OS_MAC