在iOS中检测点击“触摸以返回通话”

时间:2020-03-05 06:04:00

标签: ios swift callkit

是否可以检测用户是否轻按了“触摸返回通话”(https://i.stack.imgur.com/9m9xi.jpg)?可能是某种委托方法,或者是application(_:didFinishLaunchingWithOptions:)

中的参数

1 个答案:

答案 0 :(得分:-1)

var tfsURI = new Uri("http://test:8080/tfs");
var networkCredential1 = new NetworkCredential("test", "test!");

    ICredentials credential = (ICredentials)networkCredential1;
    Microsoft.VisualStudio.Services.Common.WindowsCredential winCred = new Microsoft.VisualStudio.Services.Common.WindowsCredential(credential);
    VssCredentials vssCredentials = new VssCredentials(winCred);

    using (TfsTeamProjectCollection collection = new TfsTeamProjectCollection(tfsURI, vssCredentials))
    {
        collection.EnsureAuthenticated();
        TswaClientHyperlinkService hyperlinkService = 
           collection.GetService<TswaClientHyperlinkService>();
        String TFSurl = hyperlinkService.GetWorkItemEditorUrl(17648).ToString(); //17648 WorkItem ID
    }

只需在您的callKit viewcontroller类中使用此代码,然后点按“触摸以返回通话”即可检查用户何时返回应用程序