Difference between revisions of "SBBulletinBannerController"

From iPhone Development Wiki
Jump to: navigation, search
(Temporary but probably like this.)
m (Switch the snippet language to Logos.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
SBBulletinBannerController can be used to post notifications to the user from a substrate tweak running inside Springboard.
 
SBBulletinBannerController can be used to post notifications to the user from a substrate tweak running inside Springboard.
  
<source lang="objc">
+
<source lang="logos">
 
BBBulletinRequest *bulletin = [[BBBulletinRequest alloc] init];   
 
BBBulletinRequest *bulletin = [[BBBulletinRequest alloc] init];   
 
bulletin.sectionID =  @"com.application.identifier";   
 
bulletin.sectionID =  @"com.application.identifier";   
Line 9: Line 9:
 
SBBulletinBannerController *controller = [%c(SBBulletinBannerController) sharedInstance];
 
SBBulletinBannerController *controller = [%c(SBBulletinBannerController) sharedInstance];
 
if ([controller respondsToSelector:@selector(observer:addBulletin:forFeed:playLightsAndSirens:withReply:)])
 
if ([controller respondsToSelector:@selector(observer:addBulletin:forFeed:playLightsAndSirens:withReply:)])
   [controller observer:nil addBulletin:bulletin forFeed:2 playLightsAndSirens:0 withReply:nil];  
+
   [controller observer:nil addBulletin:bulletin forFeed:2 playLightsAndSirens:YES withReply:nil];  
 
else if ([controller respondsToSelector:@selector(observer:addBulletin:forFeed:)])
 
else if ([controller respondsToSelector:@selector(observer:addBulletin:forFeed:)])
 
   [controller observer:nil addBulletin:bulletin forFeed:2];
 
   [controller observer:nil addBulletin:bulletin forFeed:2];
 
[bulletin release];
 
[bulletin release];
 
</source>
 
</source>
 +
 +
== References ==
 +
 +
<references/>
 +
 +
{{occlass|library=SpringBoard.app|navbox=1}}

Latest revision as of 06:52, 10 May 2016

SBBulletinBannerController can be used to post notifications to the user from a substrate tweak running inside Springboard.

BBBulletinRequest *bulletin = [[BBBulletinRequest alloc] init];  
bulletin.sectionID =  @"com.application.identifier";  
bulletin.title =  @"Title";  
bulletin.message  = @"Message";  
bulletin.date = [NSDate date];  
SBBulletinBannerController *controller = [%c(SBBulletinBannerController) sharedInstance];
if ([controller respondsToSelector:@selector(observer:addBulletin:forFeed:playLightsAndSirens:withReply:)])
  [controller observer:nil addBulletin:bulletin forFeed:2 playLightsAndSirens:YES withReply:nil]; 
else if ([controller respondsToSelector:@selector(observer:addBulletin:forFeed:)])
  [controller observer:nil addBulletin:bulletin forFeed:2];
[bulletin release];

References