的engage:fromViewController:
返回值指示是否表現出對事件的交互:
BOOL interactionShown = [[ATConnect sharedConnection] engage:@"event" fromViewController:vc];
if (interactionShown) {
// Interaction (Survey, Rating Prompt, etc) was shown.
} else {
// No interaction was shown.
}
您也可以use方法willShowInteractionForEvent:
知道的相互作用會你搞一個活動,下一次顯示:
BOOL availableSurvey = [[ATConnect sharedConnection] willShowInteractionForEvent:@"show_survey_event"];
if (availableSurvey) {
// Show "Show Survey" button.
} else {
// Hide "Show Survey" button.
}
Apptentive還張貼了一些通知,你可以監聽並響應通過NSNotificationCenter
:
/** Notification sent when Message Center unread messages count changes. */
extern NSString *const ATMessageCenterUnreadCountChangedNotification;
/** Notification sent when the user has agreed to rate the application. */
extern NSString *const ATAppRatingFlowUserAgreedToRateAppNotification;
/** Notification sent when a survey is shown. */
extern NSString *const ATSurveyShownNotification;
/** Notification sent when a survey is submitted by the user. */
extern NSString *const ATSurveySentNotification;
最後,我們正在研究這方面的一些新功能。當這些答案可用時,我會更新這個答案。
對於我來說,知道什麼時候交互完成並且Apptentive速率對話已關閉對我很有用。等待你的更新到這個答案。謝謝。 – amit 2014-10-08 06:23:06
@amit你介意給我發電子郵件嗎? 'peter&apptentive.com'。我們希望與一些將使用它們的客戶討論這些即將推出的功能,以確保他們能夠滿足您的需求。 – pkamb 2014-10-08 18:19:49
@pkamb:我需要檢查事件對話框當前是否在屏幕上,並基於此我將檢查一些條件。有什麼方法可以知道,而不是顯示或將顯示類型的功能? – Tarun 2015-04-09 11:13:44