There are many methods in the SDK that request a list of strings ending in zero, for example, in a UIActionSheet file:
- (id)initWithTitle:(NSString *)title delegate:(id < UIActionSheetDelegate >)delegate cancelButtonTitle:(NSString *)cancelButtonTitle destructiveButtonTitle:(NSString *)destructiveButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ...
'otherButtonTitles' in this case is a list of NSStrings terminated by zero. What I would like to do is call this method with the built NSMutableArray from NSStrings, because I would like to dynamically create and organize the arguments. How should I do it? I am not sure how to create an NSS pointer for NLS in this case, and if its transfer will work. Do I have to allocate memory for her manually and release it?
source
share