Open muyexi opened 9 years ago
I want to add notification to all view using aspects, it crash wtih error "EXC_BAD_ACCESS" when receive notification
[UIView aspect_hookSelector:@selector(initWithFrame:) withOptions:AspectPositionAfter usingBlock:^(id<AspectInfo> aspectInfo){ [[NSNotificationCenter defaultCenter] addObserverForName:HGDidUpdateViewModeNotification object:nil queue:nil usingBlock:^(NSNotification *note){ //Crash if ([[aspectInfo instance] respondsToSelector:@selector(switchViewMode)]){ } }];
perhaps the aspected UIView was dealloc or reinit.
How does the crash look like when you run this with zombies enabled?
I want to add notification to all view using aspects, it crash wtih error "EXC_BAD_ACCESS" when receive notification