Just a little Objective-C “trick” to make long NSString constants a little bit more readable in your Code:
To break a part of the long string to a new line you have to wrap it in quotation marks. The compiler will then put it back together to one long string.
So instead of doing this:
NSString *htmlStr = @"<html><head><title>PageTitle</title></head><body>
You could do this:
NSString *htmlStr = @"<html>"
Of course the cleanest thing to do would be to separate the html code completely from your Objective-C code by putting it into a separate HTML file and load that into a string. But hey, who wants to be perferct all the time?