MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / collectSubviews

Function collectSubviews

packages/nativescript-inspector/src/index.ts:1623–1635  ·  view source on GitHub ↗
(
  view: any,
  predicate: (view: any) => boolean,
  result: any[] = [],
)

Source from the content-addressed store, hash-verified

1621}
1622
1623function collectSubviews(
1624 view: any,
1625 predicate: (view: any) => boolean,
1626 result: any[] = [],
1627): any[] {
1628 for (const child of nsArray(read(view, "subviews"))) {
1629 if (predicate(child)) {
1630 result.push(child);
1631 }
1632 collectSubviews(child, predicate, result);
1633 }
1634 return result;
1635}
1636
1637function tabBarControls(tabBar: any): any[] {
1638 const controls = collectSubviews(

Callers 2

tabBarControlsFunction · 0.85

Calls 2

nsArrayFunction · 0.85
readFunction · 0.85

Tested by

no test coverage detected