Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about iOS development and PDF

Not Accurate of get Annotation

More
IP: 192.168.0.71 11 years 8 months ago #7038 by ex93nball
I got this code to get Annot from page, but its not accurate with coordinate.
sometimes i got annot with that x,y coordinate on page 1 but when i scroll a half to page 2 and touch the annot its not recognise an annotation on page 2 :(

- (void)OnSingleTapped:(float)x :(float)y :(NSString *)text{
struct PDFV_POS pos;
[m_view vGetPos:&pos];
PDFPage *page = [m_doc page:pos.pageno];

PDFAnnot *m_annot = [page annotAtPoint:x: y];
NSLog(@"tipe annot = %d, pageno = %d",m_annot.type,pos.pageno);
}
More
IP: 192.168.0.71 11 years 8 months ago #7043 by radaee
PDFPage *page = [m_doc page:pos.pageno];
[page objsStart];
//...
More
IP: 192.168.0.71 11 years 8 months ago #7044 by ex93nball
I got this Error:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PDFPage annotAtPoint:]: unrecognized selector sent to instance 0x7bac7b10'
More
IP: 192.168.0.71 11 years 8 months ago - 11 years 8 months ago #7177 by Gracanin
The following doesn't work, how do I select annotations that are already in the PDF
Code:
-(void)OnSingleTapped:(float)x :(float)y :(NSString *)text { struct PDFV_POS pos; [m_view vGetPos:&pos]; PDFPage *page = [m_doc page:pos.pageno]; [page objsStart]; PDFAnnot *annot = [page annotAtPoint:x :y]; if(annot) { PDF_RECT rect; [annot getRect:&rect]; NSLog(@"%f %f %f %f", rect.left, rect.top, rect.right, rect.bottom); } }

EDIT: It doesn't work in View Controller, but in PDFView.m it works fine.
Last edit: 11 years 8 months ago by tutChetsRoodo. Reason: Found soultion
Time to create page: 0.480 seconds
Powered by Kunena Forum