I'm just trying to get to QLPreviewController.view. In fact, I want to catch the tap event on its view, to show / hide the toolbar, etc. I'm trying to:
QLPreviewController* qlpc = [QLPreviewController new];
qlpc.delegate = self;
qlpc.dataSource = self;
qlpc.currentPreviewItemIndex=qlIndex;
[navigator pushViewController:qlpc animated:YES];
qlpc.title = [path lastPathComponent];
[qlpc setToolbarItems:[NSArray arrayWithObjects:self.dirBrowserButton,self.space, self.editButton, self.btnSend, nil] animated:YES];
UITapGestureRecognizer* gestTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showControls:)];
gestTap.cancelsTouchesInView=NO;
[qlpc.view addGestureRecognizer:[gestTap autorelease]];
[qlpc release];
And nothing happens
If I connect the UITapRecognizer to navigationController.view, it only works if I touch the toolbar / navigation bar. UISwipeGestureRecognizer works fine in this case.
I tried to attach a transparent overlay view and add gesture recognizers to it, but no luck. Well, I saw some applications that implement such a function, so obviously this is possible, but how? Sorry, I googled all day and did not find any solution. Please help me.
source
share