I was wondering, what header/function I have to hook into to customize or block banner notifications in iOS 5? I have tried many functions so far but none of them seem to work anymore.

Any help is truly appreciated.

THX!!

有帮助吗?

解决方案

Try hooking - (void)_presentBannerForItem:(id)arg1 method within SBBulletinBannerController. If you are using Theos, then the following code snippet should prevent the banner notification from being presented. For more control, look into other methods in this class

#import <SpringBoard/SpringBoard.h>

%hook SBBulletinBannerController

- (void)_presentBannerForItem:(id)arg1
{
    %log;

}
%end
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top