Rotate PDF in UIWebView with Swift
<p>I got a view that is used to show different PDF files in a <code>UIWebView</code>, this <code>UIWebView</code> load the PDF file as <code>NSData</code> like:</p>

<pre><code>webView.loadData(pdfData, MIMEType: "application/pdf", textEncodingName: "utf-8", baseURL: NSURL())
</code></pre>

<p>Now there are some PDF files that need to be rotated via <code>UIButton</code>  that is above the <code>UIWebView</code>, is there a way to rotate the PDF inside of the <code>UIWebView</code>?</p>

<p>What i did try so far was </p>

<p><code>webView.transform = CGAffineTransformMakeRotation(CGFloat(M_PI_2)</code>)</p>

<p>but this was not getting me the result i was looking for.</p>