Objective-C syntax
Posted
by mebFace
on Stack Overflow
See other posts from Stack Overflow
or by mebFace
Published on 2010-06-13T09:27:02Z
Indexed on
2010/06/13
9:32 UTC
Read the original article
Hit count: 410
iphone
|objective-c
I've been studying objective-c for a few days now. I keep coming across these two structures:
NSString * somestring
(NSString *) somestring
I understand the first simply sets a pointer to an NSString object, but what does the second construct do, and when should I use it? What's the deal with the asterix marks?
Sorry if this question doesn't make any sense, I am completely new to this language, and haven't even reached the level of asking proper questions.
Main purpose -- I'm trying to decipher this method:
-(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger) row forComponent: (NSInteger)component
*Also, the classes I chose don't matter. *
© Stack Overflow or respective owner