【问题标题】:Change UIDocumentBrowserViewController Create Document button text更改 UIDocumentBrowserViewController 创建文档按钮文本
【发布时间】:2019-01-21 23:37:00
【问题描述】:

我有一个基于文档的 iOS 应用程序,它使用 UIDocumentBrowserViewController。该应用程序允许创建文档,因此应用程序启动时出现的文件浏览器包含带有大号 + 符号和默认文本 创建文档 的标准按钮,如下图所示。

是否可以更改默认文本,使其更适合我的应用程序?例如,在 Numbers 应用程序中,文本是 Create Spreadsheet 而不是 Create Document

我找不到与此问题相关的文档。

【问题讨论】:

    标签: ios swift xcode uidocumentbrowservc


    【解决方案1】:

    iOS 13 添加了localizedCreateDocumentActionTitle 属性以允许您更改按钮的标题。

    /// Title of the Create Document button (default: "Create Document”).
    @available(iOS 13.0, *)
    open var localizedCreateDocumentActionTitle: String
    

    【讨论】:

      猜你喜欢
      • 2018-01-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-05
      • 2012-05-24
      • 2012-05-27
      相关资源
      最近更新 更多