Skip to content

0.8.0

Compare
Choose a tag to compare
@nalexn nalexn released this 15 Jun 11:16

Released on 2021-06-15.

  • Inspection of a custom ViewModifier is now fully aligned with a custom View inspection and is devoid of some shortcomings. Your existing tests won't break, but if you choose to migrate to the new one - please refer to the guide for updated snippets for the class Inspection. Kudos to @gili-labs for playing an essential role in the research and development of this feature.

  • A View that has applied custom ViewModifier now inherits view and environment modifiers applied inside that custom ViewModifier. See the example below:

struct MyModifier: ViewModifier {
    func body(content: Self.Content) -> some View {
        content
           .padding(.top, 15)
    }
}

let view = Text("Hi").modifier(MyModifier())

Before: Text would report it has no padding modifier applied.
Now: Text reports the padding applied from inside the MyModifier.

  • Merged PR #112: Added support for Map view inspection (requested in #59).
  • Added support for MapAnnotation inspection.