iphone-common-codes-ccteam源代码 CCUILocalNotification.m

//  
// CCUILocalNotification.m
// CCFC
//
// Created by xichen on 11-12-24.
// Copyright 2011 ccteam. All rights reserved.
//


#import "CCUILocalNotification.h"




@implementation UILocalNotification(cc)


// create a common local notification
+ (UILocalNotification *)createCommonNotification:(NSString *)alertBody withTime:(NSTimeInterval)fireSeconds
{
UILocalNotification *noti = [[UILocalNotification alloc] init];
if(noti != nil)
{
NSDate *now = [NSDate date];
noti.fireDate = [now dateByAddingTimeInterval:fireSeconds];
noti.timeZone = [NSTimeZone defaultTimeZone];
noti.alertBody = alertBody;
[[UIApplication sharedApplication] scheduleLocalNotification:noti];
}
[noti release];

return noti;
}


@end

 

可能有更新:

googlecode链接地址:http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCUILocalNotification.m

github地址: https://github.com/cxsjabc/iphone-common-codes-ccteam/tree/master/CCFC/files/CCUILocalNotification.m

 

你可能感兴趣的:(notification)