objc2 icon indicating copy to clipboard operation
objc2 copied to clipboard

`extern_class!` shorthand for property access

Open madsmtm opened this issue 1 year ago • 0 comments

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 specific UIColor instance
  • UIView has a lot of getter/setter properties
    • Difficult because some cases might use &mut self for mutation, while others might use &self
  • The x -> isX translation for BOOL properties can be kinda confusing, and would be nice to handle automatically

See also https://github.com/madsmtm/objc2/pull/161#issuecomment-1166560468.

madsmtm avatar Aug 29 '22 15:08 madsmtm