azamsharp / AZNotification

Notification Control Using UIKit Dynamics in iOS 7
81 stars 16 forks source link

AZNotificationView not release #4

Open springlo opened 10 years ago

springlo commented 10 years ago

407b3023-588a-4fa0-a950-2dc38a1798b9

ddaddy commented 9 years ago

Was just coming here to say the same.

- (void)dealloc
{
    NSLog(@"%s", __PRETTY_FUNCTION__);
}

This never logs.

Any idea what is keeping a reference?

ddaddy commented 9 years ago

@springlo did you ever find what's holding onto this?

ddaddy commented 9 years ago

I've found a fix. At the end of the hideNotification method, add [self performSelector:@selector(removeFromView) withObject:nil afterDelay:1.5]; then add a new method:

-(void)removeFromView
{
    [_gravity removeItem:self];
    [_collision removeItem:self];
    [_itemBehavior removeItem:self];

    [self removeFromSuperview];
}