BOOL 값을 NSDictionary 에 넣어보자.

BOOL 값과 같은 비 객체는 NSDictionary 에 넣을 수 없습니다. 그래서 다음과 같이 값을 숫자로 변신 시켜서 저장해야 합니다.  

BOOL isInReply;

NSNumber *isInReplyToNumberValue = [NSNumber numberWithBool:isInReply];

reply = [NSDictionary dictionaryWithObjectsAndKeys: reply_time, @"time", reply_id, @"iD", isInReplyToNumberValue, @"isInReply", reply_content, @"content", nil];
Creative Commons License
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.0 Korea License.
This entry was posted in iOS, Mac and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>