[objc] NSNull check

iPhone 2013. 4. 18. 20:38

JSON에서 받은 값에서 NULL의 값은

NSNull로 돌아오는데.

그 체크를 하려면



if
(title == (id)[NSNull null] || title.length == 0 ) title = @"Something";




http://stackoverflow.com/questions/968792/what-is-the-right-way-to-check-for-a-null-string-in-objective-c






Posted by tenn
,