Neither. The code you posted is an interface declaration; getters and setters go in an @implementation
context, and are usually created using the @synthesize
directive, as in
@synthesize str;
@synthesize date;
There are a number of attributes that can go after a property declaration. In this case, the readwrite
specifies that the value of the property can be set (using the someObject.str = @"foo"
syntax); the opposite is readonly
, which means that the value of the property cannot be set. assign
—as opposed to copy
or retain
—means that the property's value gets set directly, whereas the latter two create a copy of the value and retain the value, respectively.