The problem I am trying to solve is to convert nil strings into empty strings so I can put that as a value in NSDictionary
.
I have the following code:
//Accessed in class
prospect.title = [self.titleLabel.text emptyWhenNil];
// NSString+Additions Category
-(NSString *) emptyWhenNil
{
if(self == nil)
return @"";
return self;
}
But for some reason the emptyWhenNil
method is never even invoked!! I am lost..