Reputation: 514
Iam making a simple app, I display pdf file with some text and images in it. Over that basic layer I would like to have another layer, this layer would be placed over image and when user touch inside this layer/view/rectangle something would happen. I would like to ask you if this is possible and are there any blocking point and what would be the best approach to achieve this goal. Thank you in advice :)
Upvotes: 0
Views: 673
Reputation: 1337
Yes, it's possible.
I think the best approach is to draw the PDF file with CoreGraphics CGPDFDocument and CGPDFPage APIs. To add your extra layers above, you could use one of the following:
With the first solution, you get the touch adding UITapGestureRecognizer to the subviews. With the other two, you add the gesture recognizer to your PDF view and then have to claculate where did the user tapped.
Upvotes: 2