iphoneios5quicklookqlpreviewcontroller

Implementing Quick Look QLPreviewController Animations


I am trying to implement the following method of QLPreviewControllerDelegate and the method requires me to return the view that shows my Preview Item before the Preview Controller; this should be self.view however I am getting the following compile error:

Automatic Reference Counting Issue: Implicit conversion of an Objective-C pointer to 'UIView *__autoreleasing *' is disallowed with ARC

How to I fix this?

//Called when a Quick Look preview is about to be presented full screen or dismissed, to     provide a zoom effect.

- (CGRect)previewController:(QLPreviewController *)controller frameForPreviewItem:(id <QLPreviewItem>)item inSourceView:(UIView **)view
{

    // Set the source view  
    view = self.view;

    // Set the Rectangle of the Icon
    return self.view.bounds; 
}

Solution

  • The view parameter is a pointer to a pointer to a view. To set it, you'd use this syntax:

    *view = self.view;