Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iPhone UILocalNotification值_Iphone_Uilocalnotification - Fatal编程技术网

iPhone UILocalNotification值

iPhone UILocalNotification值,iphone,uilocalnotification,Iphone,Uilocalnotification,我正在创建几个具有不同重复间隔的UILocalNotification 所有重复间隔都使用NSCalendarUnit指定,如 myNotification.repeatInterval = NSWeekdayCalendarUnit; 我正在调试。当我使用打印包含通知的NSArray时 NSArray* oldNotifications = [app scheduledLocalNotifications]; NSLog(@"alarms = %@", oldNotifications);

我正在创建几个具有不同重复间隔的UILocalNotification

所有重复间隔都使用NSCalendarUnit指定,如

myNotification.repeatInterval = NSWeekdayCalendarUnit;
我正在调试。当我使用打印包含通知的NSArray时

NSArray*  oldNotifications = [app scheduledLocalNotifications];
NSLog(@"alarms = %@", oldNotifications);
我看到通知打印如下:

“{火灾日期=2011-09-19 06:26:00+0000,时区=欧洲/里斯本(西部)偏移3600 (白天),重复间隔=512,下次火灾日期=2011-09-19 06:26:00+0000}“

请注意,重复间隔是一个数字,在本例中为512,但它可以是256,0,等等

在哪里可以找到这些数字与NSCalendarUnit的等价性?我需要知道它们是什么,以便调试。Xcode上的“跳转到定义”不显示数字


谢谢你!我意识到我可以像这样简单地打印值:

NSLog(@"NSEraCalendarUnit = %d", NSEraCalendarUnit);
NSLog(@"NSYearCalendarUnit = %d", NSYearCalendarUnit);
NSLog(@"NSMonthCalendarUnit = %d", NSMonthCalendarUnit);
NSLog(@"NSDayCalendarUnit = %d", NSDayCalendarUnit);
NSLog(@"NSHourCalendarUnit = %d", NSHourCalendarUnit);
NSLog(@"NSMinuteCalendarUnit = %d", NSMinuteCalendarUnit);
NSLog(@"NSSecondCalendarUnit = %d", NSSecondCalendarUnit);
NSLog(@"NSWeekCalendarUnit = %d", NSWeekCalendarUnit);
NSLog(@"NSWeekdayCalendarUnit = %d", NSWeekdayCalendarUnit);
。。。等


了解整数的等价性。

…或查看。参考文献没有给出整数值。参考文献摘录:
kCFCalendarUnitWeekday=(1这是克林贡语。如果您能告诉我如何将其翻译成整数,我将不胜感激。

NSLog(@"NSEraCalendarUnit = %d", NSEraCalendarUnit);
NSLog(@"NSYearCalendarUnit = %d", NSYearCalendarUnit);
NSLog(@"NSMonthCalendarUnit = %d", NSMonthCalendarUnit);
NSLog(@"NSDayCalendarUnit = %d", NSDayCalendarUnit);
NSLog(@"NSHourCalendarUnit = %d", NSHourCalendarUnit);
NSLog(@"NSMinuteCalendarUnit = %d", NSMinuteCalendarUnit);
NSLog(@"NSSecondCalendarUnit = %d", NSSecondCalendarUnit);
NSLog(@"NSWeekCalendarUnit = %d", NSWeekCalendarUnit);
NSLog(@"NSWeekdayCalendarUnit = %d", NSWeekdayCalendarUnit);