QLPreviewController has no previewItemTitle property. You mean the QLPreviewItem protocol.
"Readonly" means that you can't set it via the property (unless it's overridden); i.e. the property does not declare a setPreviewItemTitle:
method. This makes sense for the protocol: the controller does not expect to be able to set the preview item titles.
For the most basic preview item, you could use something like this:
@interface BasicPreviewItem : NSObject<QLPreviewItem>
{
}
@property (nonatomic, retain) NSURL * previewItemURL;
@property (nonatomic, copy) NSString* previewItemTitle;
@end
@implementation BasicPreviewItem
@synthesize previewItemURL, previewItemTitle;
-(void)dealloc
{
self.previewItemURL = nil;
self.previewItemTitle = nil;
[super dealloc];
}
@end
However, the point of the protocol is so that you can take any class and add -(NSURL*)previewItemURL
and -(NSString*)previewItemTitle
methods (e.g. if you had a music player, you could add those methods to the "Track" class and be able to preview tracks).