Closed pervel closed 10 years ago
Using the outlet :some_text
method has the same effect as attr_accessor
, and generates the @property
declaration that you're asking for here. This would be duplicate behavior, and would be a breaking change. Is there a compelling reason to using attr_accessor
instead of outlet
?
Also, outlet
does accept a second arg, which is the type of the variable (as a string or classname)
outlet :some_text, UILabel
outlet :some_text, 'UILabel'
outlet :some_text # 'id' is the default value
In order to facilitate KVO-bindings using Interface Builder, should IB generate a
@property
inStubs.h
for anattr_accessor
?Something like this:
should generate:
Now the property name
some_text
can easily be used in Interface Builder to bind a control to a value like this:I am not sure if there is a need to specify the Objective-C type of the property or if
id
will always work as expected.