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;
精彩评论