UIDocumentInteractionController更改呈现视图的标题

UIDocumentInteractionController更改呈现视图的标题

问题描述:

我正在使用UIDocumentInteractionController来显示PDF文件。我的文件使用不友好的编码文件名存储在文件系统中。我确实可以访问该文件的更友好的名称,但该文件不以此名称存储(出于唯一性原因)。UIDocumentInteractionController更改呈现视图的标题

当我将文档加载到UIDocumentInteractionController中时,视图在标题栏中显示不友好的“真实”文件名。

有什么方法可以改变UIDocumentInteractionController提供的显示标题吗?

谢谢。

UIDocumentInteractionController有一个name属性,您可以设置为您的用户友好名称。该名称将用于所呈现文档的标题栏中。

+0

非常感谢 - 非常感谢 – whatdoesitallmean

+0

非常感谢,这很有帮助。 – swiftBoy

+0

@RDC你能告诉我示例代码,因为它不适合我。 –