[英]IPhone app - invoke function on incoming call
I have a piece of code (my app) which I want to run for each incoming call in the iphone. 我有一段代码(我的应用程序),我想为iPhone中的每个传入呼叫运行该代码。
So I'm looking for a function like: On Before Incoming Call (); 所以我正在寻找一个函数,如:On Incoming Call();
is there anything like that? 有没有类似的东西?
You should check the applicationWillResignActive: method in your UIApplicationDelegate. 您应该在UIApplicationDelegate中检查applicationWillResignActive:方法。
http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/applicationWillResignActive : http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/applicationWillResignActive :
Check the UIApplicationDelegate method 检查UIApplicationDelegate方法
- (void)applicationWillResignActive:(UIApplication *)application
In case of incoming telephony interruption this method will be invoked! 万一电话中断,此方法将被调用!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.