Skip to content

Swift View Query - provides a query service for views under UIKit in Swift.

License

Notifications You must be signed in to change notification settings

Meterwhite/VquerySwift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift View Query

Vquery Features

  • Vquery provides a query service for views in both UIKit and AppKit for Swift.
  • Vquery supports xib layouts well.
  • Supports SPM and CocoaPods management.

Installation

  • Manual import of the file Vquery.swift
import Vquery
  • SPM(Swift Package Manager):
https://github.com/Meterwhite/VquerySwift
  • CocoaPods:
    pod 'Vquery'

Sample Code

  • Query the view and perform some
someView.vquery{ $0.tag == index }.foreach{ $0.isHidden = true }
  • Query by matching type and condition:
someView.vquery(ofType: MyLabel.self){ $0.yearTitle == "2024" }
  • Query sibling views by matching type and condition:
someView.vquerySibling(ofType: MyLabel.self){ $0.yearTitle == "2024" }
  • Work with views laid out in xib:
someView.vqueryByInspector(tag: index, accessibilityLabel: "Row Title")

More Details

  • Check out the Demo:
    • Click< > Code-> Download ZIP
    • Open the project Vquery-demo

About

Swift View Query - provides a query service for views under UIKit in Swift.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published