Skip to content

Instantly share code, notes, and snippets.

View artdeell's full-sized avatar
💭
textin' in Discord

Maksim Belov artdeell

💭
textin' in Discord
  • Kostroma, Russia
View GitHub Profile
@muukii
muukii / UIView+Util.swift
Last active March 13, 2023 05:54
Find UIView by AccessibilityIdentifier
extension UIView {
public class func findByAccessibilityIdentifier(identifier: String) -> UIView? {
guard let window = UIApplication.sharedApplication().keyWindow else {
return nil
}
func findByID(view: UIView, _ id: String) -> UIView? {
if view.accessibilityIdentifier == id { return view }
for v in view.subviews {