Я использую UIPrintInteractionController
, представляя его из rect.
UIPrintInteractionController *controller = [UIPrintInteractionController sharedPrintController];
// than set printing settings
...
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
[controller presentFromRect:rect inView:view animated:YES completionHandler:completionHandler];
Чем я определил количество страниц ( > 1) и выберите принтер. Перед вращением устройств я вызываю
[controller dismissAnimated:animated];
согласно документации Xcode: You should dismiss the printing options when they are presented in a sheet or animated from a rectangle and the user changes the orientation of the device.
Когда я представляю UIPrintInteractionController
после вращения, количество копий печати устанавливается на 1 (как в исходном виде), тогда как принтер остается выбранным.
Ivar _copies из UIPrintInfo является приватным, поэтому я не могу его получить и хранить во время вращения.
Как восстановить количество страниц печати после вращения?