私はに取り組んでいますPSPDFKIT
、
add and remove buttons
注釈ツールバーからの解決策が必要です。
したいですchange some default annotation images
。
誰でもこれらの問題を解決する方法を提案できますか、事前に感謝します!!!
PSPDFViewControllerでPSPDFDocumentを初期化するときにカスタム ボタンを追加します。
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];
ナビゲーションバーの場合 -
navigationItem.leftBarButtonItems/rightBarButtonItems = @[brightnessBtn, closeBtn, moontab];
ツールバーの場合 -
[toolbar setItems:@[brightnessBtn, closeBtn, moontab]];