是否可以检测用户是否轻按了“触摸返回通话”(https://i.stack.imgur.com/9m9xi.jpg)?可能是某种委托方法,或者是application(_:didFinishLaunchingWithOptions:)
答案 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类中使用此代码,然后点按“触摸以返回通话”即可检查用户何时返回应用程序