views:

28

answers:

1

I am building an HTML file which will later be emailed through my app. Currently I am creating the html by appending the strings together. This is a painful process.

Is there another way that I can just put a large block of html into an NSString? Currently the line breaks in the string are screwing it up.

+2  A: 

You could use the NSMutableString method -appendString:, or pull the HTML in through a file with the NSString method -stringWithContentsOfFile:encoding:error:.

Alex Reynolds
See http://iphoneincubator.com/blog/data-management/how-to-read-a-file-from-your-application-bundle for examples
Pumbaa80
Thanks guys, this, used with stringByReplacingOccurencesOfString worked magic!
Nic Hubbard