Xcode swift 2 HTML img src

I have a project written in Swift 2.0 that exports some HTML written text as a PDF. I want to insert an image into my HTML but have to use quotations for the <img src= "dividerImage.png">. It it is not accepting the quotes because it is already within the url string text quotations as shown:

url = "<h>Title of PDF</h> [image source text here] <body>PDF body text here</body>"

Is what I'm trying to do not possible? I've search online for documentation on this in Swift 2.0 with no luck. Thank you.

Answers


You can use simple quote:

url = "<h>Title of PDF</h> <img src= 'dividerImage.png'> <body>PDF body text here</body>"

or escape double quote:

url = "<h>Title of PDF</h> <img src= \"dividerImage.png\"> <body>PDF body text here</body>"

Need Your Help

total price in crystal report

sql-server crystal-reports

I try to get total of sale price in crystal report. In sale price column amount is displayed by quantity*net price = net value now if one sale order have multiple items then i want sum of all these

Spring Webflow (and Freemarker) - restrict page to one user

spring freemarker spring-webflow

I am working on an application with Spring Webflow, Freemarker, Hibernate (JPA) and Oracle.