Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 33

LevensGardener
Aspiring developer
Profile
Posts: 220
Reg: Sep 30, 2012
Kendal
10,450
03/05/13 12:58 AM (12 years ago)

Strange behaviour in PDF zooming...

I have included some plans and maps as PDFs in my app, and I have been trying to work out why a double tap mostly has no effect, then now and again will give the zoom I was looking for. After much trial and error, (and at risk of developing tapper's finger- a hitherto undiagnosed repetitive strain injury!) I have discovered it only works when there is some text beneath the tap. I would rally like the double tap to work right across the PDF plan. Is there some tweek to the code to achieve this? Thank you... Chris
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
03/05/13 06:27 AM (12 years ago)
Hi @LevensGardener, Yes don't want you to get "developing tapper's finger." I'm not sure if this is IOS or Android but the pdf should act the same. You wanting a pdf to zoom when it's empty? Also do a pinch with your fingers and it will do a zoom. LA
 
LevensGardener
Aspiring developer
Profile
Posts: 220
Reg: Sep 30, 2012
Kendal
10,450
like
03/05/13 06:59 AM (12 years ago)
I am working with IOS and have the app working as a test on my iPhone. Here is a copy of one of the garden plans as a PDF https://dl.dropbox.com/u/3433634/Levens%20Hall%20Garden%20Map%20copy.pdf The plan appears in the app just fine, and you can pinch to zoom. It is just that I (and I assume therefore many of the end users) would expect the usual double tap to result in a zoom. Confusingly, sometimes it does zoom, and sometimes it doesn't- its all down to whether the double tap happened to be over some text in the PDF. It would be great to enable double tap to zoom anywhere on these documents. Do you know if that is possible? I am sure this works elsewhere in IOS. Thanks...
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
03/05/13 07:19 AM (12 years ago)
Hi @LevensGardener, If you know how to code it then you can add a UITapGestureRecognizer. LA
 
LevensGardener
Aspiring developer
Profile
Posts: 220
Reg: Sep 30, 2012
Kendal
10,450
like
03/05/13 07:37 AM (12 years ago)
A what?! Sadly I am no coder... I did wonder about having a transparent layer with transparent text all over it. The PDF underneath would probably not zoom then though... Thanks. Chris
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
03/05/13 07:47 AM (12 years ago)
Hey @LevensGardener, I'm not familiar enough with IOS to give you a positive answer on this without coding it. You could try the text overlay like you just mentioned. LA
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.