views:

33

answers:

1

To display attachments on a messaging system I'm developing for my app, I've got a UIWebView which is presented in a ModalViewController, displaying the file contained in the attachment.

If it's any help, the code I'm using to display the file is as follows:

NSUrl docUrl = NSUrl.FromFilename(filePath);
NSUrlRequest request = new NSUrlRequest(docUrl);
webView.LoadRequest(request);

(filePath is a string of the Path to the file).

This works fantastic for displaying PDFs, text documents etc.

However, the UIWebView isn't accepting any multi touch gestures (pinch to zoom etc) - I've set

webView.MultipleTouchEnabled = true;
webView.UserInteractionEnabled = true;

yet still no luck. Will I have to use a GestureRecognizer or am I missing something obvious?

I'm aware I'm using Monotouch but Objective C answers are more than welcome : )

+1  A: 

Is it possible that scalesPageToFit is set to NO? That might cause similar behavior to what you are seeing.

MattLeff
This worked thank you very much. If you read my earlier comment, ignore that, I editted the wrong file, which would explain why it didn't effect this web view; hadn't had my morning coffee by then !
Luke