I have used this code for replacing “\n” with “”, but it is not working.
How can I do it?
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;
For more information refer to stringByReplacingOccurrencesOfString:withString: method
Hope this helps you.
UPDATE
Swift 3.0
and If I am not wring it will also work for Swift 4.0