ios CCUILocalNotification.m

objectivec 复制代码
//
//  CCUILocalNotification.h
//  CCFC
//
//


#import <Foundation/Foundation.h>




@interface UILocalNotification(cc)


// create a common local notification
+ (UILocalNotification *)createCommonNotification:(NSString *)alertBody 
                                                                                 withTime:(NSTimeInterval)fireSeconds;




@end
objectivec 复制代码
//
//  CCUILocalNotification.m
//  CCFC
//
//


#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

微风不燥,阳光正好,你就像风一样经过这里,愿你停留的片刻温暖舒心。

我是程序员小迷(致力于C、C++、Java、Kotlin、Android、iOS、Shell、JavaScript、TypeScript、Python等编程技术的技巧经验分享),若作品对您有帮助,请关注、分享、点赞、收藏、在看、喜欢,您的支持是我们为您提供帮助的最大动力。

欢迎关注。助您在编程路上越走越好!

相关推荐
2501_915106321 小时前
苹果App Store上架费用及流程全面解析
android·ios·小程序·https·uni-app·iphone·webview
Privasa-隐私实验室2 小时前
蓝牙-多设备调试效率翻倍:从手动折腾到全自动调试的完整落地流程
物联网·ios·智能家居·智能硬件·智能手表
黑科技iOS上架6 小时前
UnityiOS工程混淆能解决App Store4.3被拒么?
ios·审核
恋猫de小郭7 小时前
iPhone Duo 适配详解,需要改变的不止是布局模型
前端·flutter·ios
Digitally9 小时前
如何在不从 iCloud 删除的情况下从iPhone删除照片
ios·iphone·icloud
游戏开发爱好者819 小时前
网络连接排查指南,谁在电脑后台偷跑流量,哪些程序在联网
网络协议·计算机网络·网络安全·ios·adb·https·udp
ii_best21 小时前
安卓脚本/ios开发软件按键精灵实战:自动定位弹窗广告关闭按钮坐标的通用方案
android·ios·自动化
Behaviour1 天前
iPhone Duo 来了,苹果 Siri AI 接入定制 Gemini
人工智能·ios·语言模型·aigc·iphone
用户2181697049301 天前
iOS 底层原理 runloop
objective-c
用户38034165882971 天前
手写 fMP4 muxer:从 ISO 14496-12 到能播的文件
ios·音视频开发