Conforms to | |
Framework | /System/Library/Frameworks/UIKit.framework |
Availability | Available in iOS 4.2 and later. |
Companion guide | |
Declared in | UIPrintInteractionController.h |
Overview
UIPrintInteractionControllerDelegate
プロトコルは UIPrintInteractionController
のデリゲートにより実装されている。UIPrintInteractionController は多くのオプションタスクを実行するためのインスタンスを共有する。
もしアプリケーションがコンテンツのサイズのための特別な要件があるならば、
printInteractionController:choosePaper:
で実装できる。printInteractionController:choosePaper:は、
UIPrintPaper
オブジェクトを返すため、 プリントジョブのために使うページサイズとプリントエリアを包含する。もし、もっと多くのプリントオブションの表現の制御を必要とするならば、デリゲートは
printInteractionControllerParentViewController:
.の実装においてプリントオプションのビューを持つビューコントローラを返す。デリゲートは、プリントのユーザインタフェースが表示されたときと終了したとき、またプリントジョブが始まったときと終ったときに動作するメソッドを実装できる。
Tasks
親のビューコントローラを返す
プリントジョブのための用紙サイズを選択する
プリントするインタフェースの表示と終了へ応答する
– printInteractionControllerWillPresentPrinterOptions:
– printInteractionControllerDidPresentPrinterOptions:
– printInteractionControllerWillDismissPrinterOptions:
– printInteractionControllerDidDismissPrinterOptions:
プリントジョブの開始と終了へ応答する
Instance Methods
printInteractionController:choosePaper:
Asks the delegate for an object encapsulating the paper size and printing area to use for the print job.
- (UIPrintPaper *)printInteractionController:(UIPrintInteractionController*)printInteractionController choosePaper:(NSArray *)paperList
Parameters
- printInteractionController
- The shared instance of
UIPrintInteractionController
that is managing the print job. - paperList
- An array of
UIPrintPaper
objects that represent combinations of paper sizes and imageable areas supported by the selected printer.
Return Value
A
UIPrintPaper
object representing both the paper size and imageable area (or printable rectangle) to use for the print job. If you return nil
, a UIPrintPaper
encapsulating the default paper size and printable rectangle is used.Discussion
This method is intended for applications (typically document-based) that have a notion of distinct paper sizes. The delegate can examine the objects in paperList to locate the paper size and printable rectangle combination that is best suited for its needs and return the encapsulating
UIPrintPaper
object. Or it can call thebestPaperForPageSize:withPapersFromArray:
class method of the UIPrintPaper
class, passing in a specific page size (typically the document size), and return the object returned by that method.Availability
- Available in iOS 4.2 and later.
See Also
printPaper
(UIPrintInteractionController
)
Declared In
UIPrintInteractionController.h
printInteractionControllerDidDismissPrinterOptions:
Tells the delegate that the printer user interface is being dismissed.
- (void)printInteractionControllerDidDismissPrinterOptions:(UIPrintInteractionController*)printInteractionController
Parameters
- printInteractionController
- The shared instance of
UIPrintInteractionController
that is managing the print job.
Discussion
This message is sent both when the user taps Print on the printing-options view and when the user dismisses the view by tapping outside it.
Availability
- Available in iOS 4.2 and later.
Declared In
UIPrintInteractionController.h
printInteractionControllerDidFinishJob:
Tells the delegate that the print job has ended.
- (void)printInteractionControllerDidFinishJob:(UIPrintInteractionController*)printInteractionController
Parameters
- printInteractionController
- The shared instance of
UIPrintInteractionController
that is managing the print job.
Discussion
You can implement this method to do clean-up tasks related to the print job. This method is called after the last page of the print job is generated but before the completion handler (a block handler of type
UIPrintInteractionCompletionHandler
) is called.Availability
- Available in iOS 4.2 and later.
Declared In
UIPrintInteractionController.h
printInteractionControllerDidPresentPrinterOptions:
Tells the delegate that the printing-options user interface has just been presented.
- (void)printInteractionControllerDidPresentPrinterOptions:(UIPrintInteractionController*)printInteractionController
Parameters
- printInteractionController
- The shared instance of
UIPrintInteractionController
that is managing the print job.
Availability
- Available in iOS 4.2 and later.
Declared In
UIPrintInteractionController.h
printInteractionControllerParentViewController:
Returns a parent view controller for managing the printing-options view.
- (UIViewController*)printInteractionControllerParentViewController:(UIPrintInteractionController*)printInteractionController
Parameters
- printInteractionController
- The shared instance of
UIPrintInteractionController
that is managing the print job.
Return Value
The view controller that is to be the parent of the print-interaction controller managing the printing-options view. Return
nil
for the standard presentation behavior.Discussion
This method allows an application to present the print-options view from a view controller of their own choosing. The parent view controller returned must be a
UIViewController
object, such as a UINavigationController
object or a generic view controller. A common strategy for embedding is to create a UINavigationController
object as the content view controller (contentViewController
property) of a UIPopoverController
object and return that. UIKit can push the returned view controller onto the stack if its parent is a navigation controller or present it modally if it isn’t.This method is invoked in any of the
present...
methods of the UIPrintInteractionController
class (for example, presentAnimated:completionHandler:
).Availability
- Available in iOS 4.2 and later.
Declared In
UIPrintInteractionController.h
printInteractionControllerWillDismissPrinterOptions:
Tells the delegate that the printing-options user interface will be dismissed.
- (void)printInteractionControllerWillDismissPrinterOptions:(UIPrintInteractionController*)printInteractionController
Parameters
- printInteractionController
- The shared instance of
UIPrintInteractionController
that is managing the print job.
Availability
- Available in iOS 4.2 and later.
Declared In
UIPrintInteractionController.h
printInteractionControllerWillPresentPrinterOptions:
Tells the delegate that the printing-options user interface is about to be displayed.
- (void)printInteractionControllerWillPresentPrinterOptions:(UIPrintInteractionController*)printInteractionController
Parameters
- printInteractionController
- The shared instance of
UIPrintInteractionController
that is managing the print job.
Availability
- Available in iOS 4.2 and later.
Declared In
UIPrintInteractionController.h
printInteractionControllerWillStartJob:
Tells the delegate that the print job is about to start.
- (void)printInteractionControllerWillStartJob:(UIPrintInteractionController*)printInteractionController
Parameters
- printInteractionController
- The shared instance of
UIPrintInteractionController
that is managing the print job.
Discussion
You can implement this method to do set-up tasks related to the print job. For example, an application that needs to do intensive rendering could implement this method to pause animations. This method is called before drawing begins but after the printing user interface is dismissed.
Availability
- Available in iOS 4.2 and later.
Declared In
UIPrintInteractionController.h
0 件のコメント:
コメントを投稿