[MonoTouch] QLPreviewController in Monotouch
Robert Jordan
robertj at gmx.net
Mon Dec 12 09:42:22 EST 2011
On 12.12.2011 12:50, Alexander wrote:
> I want to open PDF files using QLPreviewController in Monotouch, but I can't
> to do this.
> QLPreviewItem is an abstract class, but object of this type returns method :
> QLPreviewControllerDataSource.GetPreviewItem(QLPreviewController, int)
You're supposed to subclass QLPreviewItem, and then return such
object from GetPreviewItem:
public class MyItem : QLPreviewItem
{
string title;
Uri uri;
public MyItem(string title, Uri uri)
{
this.title = title;
this.uri = uri;
}
public override string ItemTitle {
get { return title; }
}
public override NSUrl ItemUrl {
get { return uri; }
}
}
Robert
More information about the MonoTouch
mailing list