- Vquery provides a query service for views under UIKit in Swift.
- Vquery supports xib layouts well.
- Supports SPM and CocoaPods management.
- Manual import of the file
Vquery.swift
import Vquery- SPM(Swift Package Manager):
- CocoaPods:
- pod 'Vquery'
- Query by matching type and condition:
someView.vquery(ofType: UILable.self){ $0.text == "2024" }- Query sibling views by matching type and condition:
someView.vquerySibling(ofType: UILable.self){ $0.text == "2024" }- Work with views laid out in xib:
someView.vqueryByInspector(ofType: UILabel.self, tag: row, accessibilityLabel: "row.title"){ $0.. }- Check out the Demo:
- 点击
< > Code-> Download ZIP - Open the project
Vquery-demo
- 点击