我已经使用此代码用“”替换“\ n”,但它不起作用。XCode中的字符替换 - Objective-C
我该怎么办?
NSString *descString = [values objectForKey:@"description"];
descString = [descString stringByReplacingOccurrencesOfString:@"\n" withString:@""];
NSLog(@"Description String ---->>> %@",descString);
catlog.description = descString;
[webview loadHTMLString:catlog.description baseURL:nil];
webview.opaque = NO;
看到这个http://stackoverflow.com/questions/1005281/remove-newline-character-from-first-line-of-nsstring – 2012-04-10 09:45:58
它以什么方式不起作用? – JeremyP 2012-04-10 09:46:19
我们没有水晶球。告诉我们,如果没有告诉我们它不工作,或者你尝试了什么,就很难为你的问题提出解决方案。 – dreamlax 2012-04-10 09:59:30