Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC:

Integrating RadaeePDF in iOS library problem 6 years 11 months ago #12319

  • PXLPDF
  • PXLPDF's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 1
  • Thank you received: 0
Hello,
I managed to integrate radaeepdf library in my test application using help tutorial you provided. But now, I have iOS library and I did the same procedure, but build fails all the time, problem is in pch file, because it imports NSObject+PerformBlock.m and <Foundation/Foundation.h> which is needed there can not be built (error is COULD NOT BUILD MODULE FOUNDATION) . I set everything like in the other project where everything is working, the difference is only because first project was an iOS app, and this one is iOS lib. Can you propose me another solution for including radaeepdf library in my project, is it neccessary to use pch file? I do not need PDF Viewer in my project, I need only to open PDF document and add/replace some images and text there, without viewing it.

Please Log in or Create an account to join the conversation.

Integrating RadaeePDF in iOS library problem 6 years 11 months ago #12327

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

NSObject+PerformBlock is only a utility category, but you can remove it and edit the methods that are using it.
Demo project uses this category only three times, and you can replace "performBlock afterDelay" with "performSelector afterDelay".
For example, in PDFView class now you can find:
[self performBlock:^{
 if (!isDoubleTapping) {
  [m_delegate OnSingleTapped:x:y];
 }
} afterDelay:0.3];
You can replace this slice of code with:
[self performSelector:@selector(callSingleTapDelegate:) withObject:[NSValue valueWithCGPoint:CGPointMake(x, y)] afterDelay:0.3];
And create this simple method:
- (void)callSingleTapDelegate:(NSValue *)valuePoint
{
    CGPoint point = [valuePoint CGPointValue];
    if (!isDoubleTapping) {
        [m_delegate OnSingleTapped:point.x:point.y];
    }
}
You can repeat this operation for the others two occurrences of NSObject+PerformBlock usage (you can search "performBlock" in workspace to see all occurrences)

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum