INNER CODE UNIT · Swift

traverse

mjrusso/scoot · Scoot/Accessibility.swift:142

        func traverse(node: UIElement) {
            guard let children: [UIElement] = try? node.arrayAttribute(.children) else {
                return
            }

            for child in children {

                // Bail, if the parent and child are (somehow?) the same node.
                //
                // See: https://github.com/mjrusso/scoot/issues/13
                guard child != node else {
                    continue
                }

                guard let frame: CGRect = try? child.attribute(.frame) else {
                    continue
                }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…