很难将其放入一个主题行,我猜... 我想要完成的是弄清楚,如果放置了委托方法调用并显示其名称。
假设我们有一个特定的类A.A类使用委托。
doThingA
现在,didThingA
在完成后调用未记录的函数,例如 - didThingA
现在,如果在// converts the collection of elements returned from
// document.querySelectorAll() into an Array, using
// Array.from(), then iterates over that Array using
// Array.prototype.forEach():
Array.from( document.querySelectorAll(".Label ul li a") ).forEach(
// using arrow function syntax to perform the same
// action on each <a> ('aElement') within the
// array; here using Element.classList API to
// add the given class-name:
aElement => aElement.classList.add('newClass')
);
函数调用被触发时实际监控它怎么可能?
另一个例子,如果我们没有ViewController的文档,有没有办法跟踪viewDidLoad,viewDidAppear等的函数调用?