/// 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
There may be updates:
Googlecode link: http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCUILocalNotification.m
GitHub address:
Https://github.com/cxsjabc/iphone-common-codes-ccteam/tree/master/CCFC/files/CCUILocalNotification.m