Open m1entus opened 3 years ago
@m1entus
regarding 2. UIView
is unknown type so you'd have to use type.based.UIView
, you should be getting type
property if the types are known to Sourcery (defined in the source it scans), let me know if that's not the case
as for 1 I think you'll get attribute
named propertyWrapper
and could look into it's arguments to find whatever you are looking for
Thanks for quick reply!
For the 1 i have defined, where @AccessibilityIdentify
is propertyWrapper type and seems there are no results, IBOutlers etc. are working fine but for my custom one i am not getting anything:
@AccessibilityIdentify(identifier: "custom_id") var testView = UIView(frame: .zero)
Regardin 2. i have done some workaround and extended UIView with my custom protocol UIViewAccessibilityIdentificable
for custom types and checking if hasPrefix UI and seems this is satisfying me for now.
{% if var.type.based.UIViewAccessibilityIdentificable or var.typeName|hasPrefix:"UI" %}
First of all big up for Sourcery @krzysztofzablocki!
{{ var.type.inherits.UIView }}
and check if veriable inherits from UIView, seems type is always nil no matter what, but typeName give me UILabel/UIView is there a reason for that type is nil for variables ?