开发者

How to store all keys/values of a NSDitionary in a string

I have a NSDictionary object containing key/value pairs. I want to be a开发者_开发知识库ble to out them to a UITextView each in a new line. How would one get about doing that?

Thanks


NSMutableString* str = [NSMutableString string];
for(NSString* key in dict) {
  [str appendFormat: @"%@ - %@\n", key, [dict valueForKey: key]];
}

textView.text = str;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜