ekurutepe / MPNotificationView

An in-app notification view that mimics the iOS 6 notification views which appear above the status bar
MIT License
346 stars 55 forks source link

Never run in delegate method #29

Closed mjspawn closed 10 years ago

mjspawn commented 11 years ago

in MPNotificationView.m

at handleTap()

if (_tapBlock != nil) { _tapBlock(self); }

if ([_delegate respondsToSelector:@selector(tapReceivedForNotificationView:)])
{
    [_delegate didTapOnNotificationView:self];
}

[[NSNotificationCenter defaultCenter] postNotificationName:kMPNotificationViewTapReceivedNotification
                                                    object:self];

change to

if (_tapBlock != nil) { _tapBlock(self); } else if ([_delegate respondsToSelector:@selector(didTapOnNotificationView:)]) { [_delegate didTapOnNotificationView:self]; } else { [[NSNotificationCenter defaultCenter] postNotificationName:kMPNotificationViewTapReceivedNotification object:self]; }

benkax commented 10 years ago

yes, same problem here, if ([_delegate respondsToSelector:@selector(tapReceivedForNotificationView:)]) will never be true, any fix already?

mjspawn commented 10 years ago

why always post notification?

ekurutepe commented 10 years ago

Why not?

Sent from my iPhone

On 01.08.2014, at 11:46, mjspawn notifications@github.com wrote:

why always post notification?

— Reply to this email directly or view it on GitHub.