Skip to content

Loose some information, de-indent snippet, mix structure #3

@valeriyvan

Description

@valeriyvan

How to reproduce: feed documentation https://stackotter.github.io/swift-cross-ui/documentation/swiftcrossui/

Look from line 2309 (in my case) and compare with the original.

  • instead of declaration struct GeometryReader<Content> where Content : View it shows filename GeometryReader.swift only;
  • de-indents snippet and shows it as plain text;
  • doesn't have Note;
  • Topics doesn't include Initializers, Default implementations;
  • not clear where bottom part comes from.
# https://stackotter.github.io/swift-cross-ui/documentation/swiftcrossui/geometryreader

- SwiftCrossUI
- GeometryReader

Structure

# GeometryReader

A container view that allows its content to read the size proposed to it.

GeometryReader.swift

## Overview

Geometry readers always take up the size proposed to them; no more, no less. This is to decouple the geometry reader’s size from the size of its content in order to avoid feedback loops.

struct MeasurementView: View {
var body: some View {
GeometryReader { proxy in
Text("Width: \(proxy.size.x)")
Text("Height: \(proxy.size.y)")
}
}
}

## Topics

### Instance Properties

`var body: EmptyView`

## Relationships

### Conforms To

- `View`

- GeometryReader
- Overview
- Topics
- Relationships

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions