HMLocationEvent *locEvent = [[HMLocationEvent alloc] initWithRegion:region1];

region1.notifyOnEntry = YES;

region1.notifyOnExit = YES;

CLRegion *region1 =  [[CLCircularRegion alloc] initWithCenter:[selectedLoc coordinate] radius:5 identifier:@"Office"];

NSDateComponents *com = [[NSDateComponents alloc] init];
com.second = 1; HMEventTrigger *tr = [[HMEventTrigger alloc] initWithName:eventName.text events:[NSArray arrayWithObject:locEvent] predicate:[HMEventTrigger predicateForEvaluatingTriggerOccurringOnDateWithComponents:com]];
[selectedHome addTrigger:tr completionHandler:^(NSError *err)
{ }];

HMLocationEvent的更多相关文章

随机推荐

  1. Android画布更新过程OnDraw调用过程

    onDraw是触发的外置接口,用户能够复写这种方法,这样当回调onDraw时,就能够绘制出用户须要的画面 这个接口方法相似onLayout的回调,利用layout(l,t,r,b)就能够触发. 而这里 ...

  2. java 判断日期是否是节假日

    1.新建一个excel命名为“节假日.xls”存放节假日,模板格式如下 2.判断是否是节假日的类 工作日返回true ,休息日返回false. 需要引用poi-bin-3.9包,包放在博客文件中 im ...

  3. 如何处理JSON中的特殊字符 介绍几种解决方案

    http://www.nowamagic.net/librarys/veda/detail/216JSON 是适用于 Ajax 应用程序的一种有效格式,原因是它使 JavaScript 对象和字符串值 ...

  4. SDK Manager 闪退的解决方式

    打开电脑的执行  也就是win+R键    然后在命令行里面打上android即可了

  5. selenium 实现浏览器 前进和后退

    #coding=utf-8from selenium import webdriver driver = webdriver.Chrome()driver.get("https://www. ...

  6. screen常用命令

    1. 背景 由于经常使用ssh登录实验室的服务器训练神经网络, 而一些复杂的神经网络模型需要长时间训练,在此期间,如果出现网络等原因出现链接中断的话,服务器的进程也会被杀死,之前的一切半途而废.利用s ...

  7. Memcached真的过时了吗?

    Memcached真的过时了吗? 这两年Redis火得可以,Redis也常常被当作Memcached的挑战者被提到桌面上来.关于Redis与Memcached的比较更是比比皆是.然而,Redis真的在 ...

  8. windows 添加打印机

    控制面板---->硬件和声音---->设备和打印机--->点击添加打印机 最后安驱动(选择通用) OK!

  9. 内存控制函数(1)-mmap() 建立内存映射

    示例1: 1.首先建立一个文本文件,名字为tmp,内容为hello world 2.编写mmap.c #include <sys/types.h> #include <sys/sta ...

  10. 167. Add Two Numbers【easy】

    You have two numbers represented by a linked list, where each node contains a single digit. The digi ...