objc2
objc2 copied to clipboard
`extern_class!` shorthand for property access
Some classes have a lot of simple properties; it may be interesting to have an easier way of accessing these?
Examples:
-
UIColor
has a lot of class properties that return a specificUIColor
instance -
UIView
has a lot of getter/setter properties- Difficult because some cases might use
&mut self
for mutation, while others might use&self
- Difficult because some cases might use
- The
x
->isX
translation forBOOL
properties can be kinda confusing, and would be nice to handle automatically
See also https://github.com/madsmtm/objc2/pull/161#issuecomment-1166560468.