I had a question regarding method and pointer declarations in Objective C.
My question about this snippet is whether I am returning a pointer to a NSString or an actual NSString?
This relates to my first question. In this I seem to be returning an actual NSString instead of the this ,(NSString *), which if I am to understand is a pointer to an NSString. Please correct me if I'm wrong. My second quesiton about this is that if I am returning a string, why is there an asterisk in front of boolString?
Code:
-(NSString *) description
{
return (@"I'm slightly confused");
}
My question about this snippet is whether I am returning a pointer to a NSString or an actual NSString?
Code:
NSString *boolString (BOOL yesNo)
{
if (yesNo == NO)
{
return (@"NO");
}
else
{
return (@"YES");
}
} // boolString
This relates to my first question. In this I seem to be returning an actual NSString instead of the this ,(NSString *), which if I am to understand is a pointer to an NSString. Please correct me if I'm wrong. My second quesiton about this is that if I am returning a string, why is there an asterisk in front of boolString?