@@ -28,10 +28,11 @@ @interface ApptentiveAboutViewController ()
28
28
@property (weak , nonatomic ) IBOutlet NSLayoutConstraint *privacyButtonLeadingConstraint;
29
29
@property (weak , nonatomic ) IBOutlet NSLayoutConstraint *aboutButtonPrivacyButtonVeritcalConstraint;
30
30
31
-
32
31
@property (strong , nonatomic ) NSArray *portraitConstraints;
33
32
@property (strong , nonatomic ) NSArray *landscapeConstraints;
34
33
34
+ @property (strong , nonatomic ) NSDictionary *closeEventUserInfo;
35
+
35
36
@end
36
37
37
38
@@ -56,12 +57,16 @@ - (void)viewDidLoad {
56
57
57
58
self.landscapeConstraints = [NSLayoutConstraint constraintsWithVisualFormat: @" H:[about]-(16)-[privacy]" options: NSLayoutFormatAlignAllBaseline metrics: nil views: @{ @" about" : self.aboutButton ,
58
59
@" privacy" : self.privacyButton }];
60
+
61
+ [[NSNotificationCenter defaultCenter ] addObserver: self selector: @selector (addCause ) name: ApptentiveInteractionsShouldDismissNotification object: nil ];
59
62
}
60
63
61
64
- (void )viewWillDisappear : (BOOL )animated {
62
65
[super viewWillDisappear: animated];
63
66
64
- [[Apptentive sharedConnection ].engagementBackend engageCodePoint: [self codePointForEvent: ATInteractionAboutViewEventLabelClose] fromInteraction: nil userInfo: nil customData: nil extendedData: nil fromViewController: self ];
67
+ [[NSNotificationCenter defaultCenter ] removeObserver: self ];
68
+
69
+ [[Apptentive sharedConnection ].engagementBackend engageCodePoint: [self codePointForEvent: ATInteractionAboutViewEventLabelClose] fromInteraction: nil userInfo: self .closeEventUserInfo customData: nil extendedData: nil fromViewController: self ];
65
70
}
66
71
67
72
- (IBAction )learnMore : (id )sender {
@@ -102,4 +107,8 @@ - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
102
107
[self .view layoutIfNeeded ];
103
108
}
104
109
110
+ - (void )addCause {
111
+ self.closeEventUserInfo = @{ @" cause" : @" notification" };
112
+ }
113
+
105
114
@end
0 commit comments