Reputation: 33050
-(Business *) currentBusiness
{
return _currentBusiness;
}
-(void) setCurrentBusiness:(Business *)currentBusiness
{
_currentBusiness = currentBusiness;
}
Should it be just like that even for strong properties?
I mean with ARC we don't need to call retain release or whatever right?
Upvotes: 0
Views: 64
Reputation: 119242
As long as you have declared that the property is backed by that ivar (easiest to do this via @synthesize currentBusiness = _currentBusiness;
), yes, this is correct.
I'm assuming you want to do more in the accessor methods than assign/return though otherwise you wouldn't bother implementing them.
Upvotes: 2