标记来电和短信

时间:2012-02-28 10:03:48

标签: iphone ios xcode

我正在尝试使用我的应用在每次来电或短信到达时进行标记。这是出于文档目的,因为我的应用程序处理汽车安全。

有什么方法可以追踪这个?我只需要知道呼叫/文本何时进入,而不是任何其他数据。

1 个答案:

答案 0 :(得分:1)

是当有这样的中断时,会调用AppDelegate中的此方法

- (void)applicationWillResignActive:(UIApplication *)application
{
    /*
     Sent when the application is about to move from active to inactive state. This can     occur for certain types of temporary interruptions (such as an incoming phone call or SMS     message) or when the user quits the application and it begins the transition to the background     state.
     Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES     frame rates. Games should use this method to pause the game.
     */
}