github nalexn/ViewInspector 0.8.0

latest releases: 0.10.0, 0.9.11, 0.9.10...
3 years ago

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.

Don't miss a new ViewInspector release

NewReleases is sending notifications on new releases.