0
내 앱에 사용자에게 알림이 필요할 때 드롭 다운 알림이 표시됩니다. 내가 직면하고있는 문제는 드롭 다운 알림을 표시하고 그 뒤에 광고가 있으면 알림에 대한 터치를 가로 챌 수 있다는 것입니다. 나는 알림이 여전히 표시 될 때 YES라는 부울 값을 가진 currentlyDisplayed를가집니다. currentlyDisplayed == YES 인 경우 광고의 터치를 가로 채고 모달로 표시하지 않겠습니다. 어떻게해야합니까? 감사! 감사합니다iOS (Adwhirl)에서 가로 채기 광고 터치
, 캄란 Pirwani
Notification code
+(void)onTap:(UITapGestureRecognizer *)tapGestureRecognizer {
CGPoint point = [tapGestureRecognizer locationInView:tapGestureRecognizer.view];
BOOL dismissTapped = [notificationView.closeNotification.layer.presentationLayer hitTest:point] != nil;
BOOL labelTapped = [notificationView.layer.presentationLayer hitTest:point] != nil;
if (dismissTapped) {
[UIView animateWithDuration:1.0f delay:0.0f options:UIViewAnimationOptionBeginFromCurrentState animations:^{
notificationView.alpha = 0.0f;
//notificationView.frame = CGRectMake(currentFrame.origin.x, -currentFrame.size.height, currentFrame.size.width, currentFrame.size.height);
}completion:nil];
}else if(labelTapped) {
[UIView animateWithDuration:0.7f animations:^{
notificationView.alpha = 0.0f;
}completion:^(BOOL finished){
[tapGestureRecognizer.view removeGestureRecognizer:tapGestureRecognizer];
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:@"announcementTapped" object:nil]];
}];
}
}