I'm working on PSPDFKIT
,
I need the solution for add and remove buttons
from annotation toolbar.
and I want to change some default annotation images
.
can anyone suggest me how to resolve those problems ,thanks in advance!!!
add custom button while initializing PSPDFDocument in PSPDFViewController
PSPDFBrightnessBarButtonItem * brightnessBtn = [[PSPDFBrightnessBarButtonItem alloc] initWithPDFViewController:self]; // PSPDFKIT native button
UIBarButtonItem * closeBtn = [[UIBarButtonItem alloc] initWithTitle:@"Home" style:UIBarButtonItemStyleBordered target:self action:@selector(close:)]; // Custom button with title.
UIButton * moonBtn = [[UIButton alloc] initWithFrame:CGRectMake(0,0,20,20)]; // Custom button with image.
[moonBtn setImage:[UIImage imageNamed:@"icon____.png"] forState:UIControlStateNormal];[moonBtn addTarget:self action:@selector(moonTapped) forControlEvents:UIControlEventTouchDown];
UIBarButtonItem * moontab = [[UIBarButtonItem alloc] initWithCustomView:moonBtn];
If it is Navigation bar -
navigationItem.leftBarButtonItems/rightBarButtonItems = @[brightnessBtn, closeBtn, moontab];
If it is Toolbar -
[toolbar setItems:@[brightnessBtn, closeBtn, moontab]];