(tabBar: any)
| 1635 | } |
| 1636 | |
| 1637 | function tabBarControls(tabBar: any): any[] { |
| 1638 | const controls = collectSubviews( |
| 1639 | tabBar, |
| 1640 | (view) => |
| 1641 | isKindOf(view, "UIControl") && |
| 1642 | isVisible(view) && |
| 1643 | hasUsableFrame(frameInScreen(view)), |
| 1644 | ); |
| 1645 | const byFrame = new Map<string, any>(); |
| 1646 | for (const control of controls) { |
| 1647 | const frame = frameInScreen(control); |
| 1648 | if (!frame) { |
| 1649 | continue; |
| 1650 | } |
| 1651 | byFrame.set(rectKey(frame), control); |
| 1652 | } |
| 1653 | return preferLargestNonOverlappingControls([...byFrame.values()]).sort( |
| 1654 | (left, right) => { |
| 1655 | const leftFrame = frameInScreen(left); |
| 1656 | const rightFrame = frameInScreen(right); |
| 1657 | return rectNumber(leftFrame, "x") - rectNumber(rightFrame, "x"); |
| 1658 | }, |
| 1659 | ); |
| 1660 | } |
| 1661 | |
| 1662 | function preferLargestNonOverlappingControls(controls: any[]): any[] { |
| 1663 | const accepted: any[] = []; |
no test coverage detected