Я хочу распечатать некоторые NSData в формате PDF, а когда я представляю UIPrintInteractionController
PDF-файл представлен правильно, но текстовые и другие данные на UITableViewCell
из UIPrintInteractionController
не отображаются.Текст в UIPrintInteractionController не отображается
Код:
UIPrintInteractionController *printController = [UIPrintInteractionController sharedPrintController];
printController.delegate = self;
UIPrintInfo *printInfo = [UIPrintInfo printInfo];
printInfo.outputType = UIPrintInfoOutputGeneral;
printInfo.jobName = [self.pdfURL lastPathComponent];
printInfo.duplex = UIPrintInfoDuplexLongEdge;
printController.printInfo = printInfo;
printController.showsPageRange = YES;
printController.printingItem = self.pdfData;
void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) = ^(UIPrintInteractionController *printController, BOOL completed, NSError *error) {
if (!completed && error) {
NSLog(@"FAILED! due to error in domain %@ with error code %lu", error.domain, (long)error.code);
}
};
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[printController presentFromBarButtonItem:sender animated:true completionHandler:completionHandler];
} else {
[printController presentAnimated:YES completionHandler:completionHandler];
}
Что может вызвать такую проблему и как ее решить?
UPDATE:
После игнорирования этого вопроса, я обнаружил, что любой подкласс UITableViewCell
в моем приложении имеет textLabel.textColor
по умолчанию устанавливается в белый цвет. И я не могу изменить его программно или в IB.