渡したオブジェクトを実際に保存しないセッターに最も適切なキーワードは何ですか? (コピー、保持、または譲渡)
具体的には、以下の endDate セッターは渡された日付を保存することはなく、内部的には numberOfNights NSUInteger を更新するだけです。
対応する getter は、startDate と numberOfNights を再結合して、新しい endDate オブジェクトを返します。
@property (nonatomic, readonly) NSDate *startDate;
@property (nonatomic) NSUInteger numberOfNights; //modifiable.
@property (nonatomic, copy) NSDate *endDate; //internally stored as an unsigned integer, number of nights.
copy 属性が最も理にかなっていると思います。(-setEndDate: に渡すポインターは、-endDate によって返されることはありません)
何かご意見は?