Skip to content

Introspect UIimageView #155

@ghost

Description

I'm trying to get imageview object but nothing i'm getting

extension View {
	public func introspectImageView(customize: @escaping (UIImageView) -> Void) -> some View {
		inject(UIKitIntrospectionView(
			selector: { introspectionView in
				guard let viewHost = Introspect.findViewHost(from: introspectionView) else {
					return nil
				}
//				return Introspect.previousSibling(containing: UIImageView.self, from: viewHost)
//				return Introspect.findChild(ofType: UIImageView.self, in: viewHost)
				return Introspect.findHostingView(from: viewHost) as? UIImageView
			},
			customize: customize
		))
	}
}

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