             
             totalLength = 0
             
-            for var i = 0; i < count; i++ {
+            for i in 0..<count {
                 guard let child = getVirtualChildAt(i) where !child.layoutHidden else {
                     continue
                 }

            // We have no limit, so make all weighted views as wide as the largest child.
            // Children will have already been measured once.
            if (useLargestChild && widthSpec != .Exactly) {
                for var i = 0; i < count; i++ {
                    guard let child = getVirtualChildAt(i) where !child.layoutHidden else {
                        continue
                    }

     * Checks whether all (virtual) child views before the given index are gone.
     */
    private func allViewsAreGoneBefore(childIndex: Int) -> Bool {
        for i in (0..<childIndex).reverse() {
            if let child = getVirtualChildAt(i) where !child.layoutHidden {
                return false
            }
