I have two questions regarding an NSArray:
- How can I add nil values to the array? Would be adding
[NSNullbe correct?
null] - What would be the best code to
return the number (count) of nil and non-nil values of this array in
your view?
Thank you!!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t add
nilto anNSArray, so you will have to use[NSNull null]instead as you said.You can count the number of
nil(NSNull) items this way: