1

私はに取り組んでいますPSPDFKIT

add and remove buttons注釈ツールバーからの解決策が必要です。

したいですchange some default annotation images

誰でもこれらの問題を解決する方法を提案できますか、事前に感謝します!!!

4

1 に答える 1

0

PSPDFViewControllerPSPDFDocumentを初期化するときにカスタム ボタンを追加します。

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]];
于 2013-11-06T09:03:12.140 に答える