0
votes

I have a UIImageView with a transparent gradient which I want to put in front of a quickLook preview controller. However, when I do this the preview controller no longer receives touch input. If I do this for a TableView there is no problem.

I use this to initialise the qlPreviewController in the init of my viewController:

   QLPreviewController* preview = [[QLPreviewController alloc] init];
    preview.dataSource = self;
    preview.delegate = self;
    [self addChildViewController:preview];//*view controller containment
    CGFloat w= self.view.frame.size.width; 
    CGFloat h= self.view.frame.size.height;
    preview.view.frame = CGRectMake(0, 0,w, h);
    [self.view addSubview:preview.view];  
    [self.view sendSubviewToBack:preview.view];
    [preview didMoveToParentViewController:self];
    self.previewController = preview;

self.view has a UIImageView in front. If I set its Hidden flag to YES, interaction works, if I set it to NO interaction is broken, even though I have set the UserInteractionEnabled to NO.

Is there a way I can make the UIImageView pass touches to the preview or its view?

I have been trying to pass the hittest to the view of the previewController, but this does nothing.

Can I use gesturerecognizers to control the previewController?

1

1 Answers

0
votes

Heh... just after posting my question I thought of a new solution:

Opening my .doc files in a UIWebView.

This is al lot easier and user interaction remains possible while beneath an UIImageView.

Solved!