IOS 应用程序设置和文本/HTML

发布于 2024-12-17 07:35:13 字数 260 浏览 1 评论 0原文

您好,我正在尝试在 iPhone 上的应用程序设置中显示大量静态文本。我已经看到 iPhone 应用程序实现了这一点,并且我正在尝试实现相同的结果。目标是用户导航到应用程序设置页面,并且他们可以查看条款和条件。

有什么指点吗?我可以显示标题或多值字符串 - 但这些仅允许显示短字符串。理想情况下,它应该打开一个可能带有 HTML 格式或换行符格式的完整页面。

我希望可以从应用程序的 iPhone 设置中使用此功能(在应用程序本身之外)。大概使用设置捆绑包和根.plist。

Hi I am trying to show a large amount of static text within the applications settings on the iPhone. I have seen an iPhone app accomplish this and I am trying to achieve the same result. The goal being if the user navigates to the applications settings page, and they can view the terms and conditions.

Any pointers? I can show a Title or MultiValue strings - but these only allow short strings to display. Ideally it should open a full page formatted perhaps with HTML - or line breaks.

I would like this to be available from the iPhone settings for the app (outside of the app iteself). Presumably using the settings bundle & Root.plist.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

木森分化 2024-12-24 07:35:13

谢谢 Rog - 我使用 iExplorer 查看了购买的应用程序中的 Settings.bundle 文件,该文件可以正常工作:它很复杂,但它的布局如下。

Root.plist:

    <dict>
        <key>Type</key>
        <string>PSGroupSpecifier</string>
        <key>Title</key>
        <string>Terms & Conditions</string>
    </dict>
    <dict>
        <key>Type</key>
        <string>PSChildPaneSpecifier</string>
        <key>Title</key>
        <string>Your Terms heading</string>
        <key>File</key>
        <string>Terms</string>
    </dict>

Terms.plist

<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
    <dict>
        <key>Type</key>
        <string>PSGroupSpecifier</string>
        <key>Title</key>
        <string>Terms1</string>
    </dict>
    <dict>
        <key>Type</key>
        <string>PSGroupSpecifier</string>
        <key>Title</key>
        <string>Terms2</string>
    </dict>
    <dict>
        <key>Type</key>
        <string>PSGroupSpecifier</string>
        <key>Title</key>
        <string>Terms3</string>
    </dict>
    </array>
</dict>

en.lproj/Root.strings

"Terms1" = "iPhone Application Terms";
"Terms2" = "These terms blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah ";
"Terms3" = "The blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah .";

Thanks Rog - i used iExplorer to look at the Settings.bundle file in the purchased app that had this working: It is complex but here is how it is laid out.

Root.plist:

    <dict>
        <key>Type</key>
        <string>PSGroupSpecifier</string>
        <key>Title</key>
        <string>Terms & Conditions</string>
    </dict>
    <dict>
        <key>Type</key>
        <string>PSChildPaneSpecifier</string>
        <key>Title</key>
        <string>Your Terms heading</string>
        <key>File</key>
        <string>Terms</string>
    </dict>

Terms.plist

<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
    <dict>
        <key>Type</key>
        <string>PSGroupSpecifier</string>
        <key>Title</key>
        <string>Terms1</string>
    </dict>
    <dict>
        <key>Type</key>
        <string>PSGroupSpecifier</string>
        <key>Title</key>
        <string>Terms2</string>
    </dict>
    <dict>
        <key>Type</key>
        <string>PSGroupSpecifier</string>
        <key>Title</key>
        <string>Terms3</string>
    </dict>
    </array>
</dict>

en.lproj/Root.strings

"Terms1" = "iPhone Application Terms";
"Terms2" = "These terms blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah ";
"Terms3" = "The blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah .";
少女情怀诗 2024-12-24 07:35:13

在视图控制器中使用 UIWebView 并为其提供您的条款和条件。 HTML 格式的条件。就是这么简单。

HTML 可以驻留在本地或服务器上。客户不需要知道它是 HTML 格式的页面,因为您的视图控制器中没有地址栏。

Use a UIWebView in a view controller and feed it your terms & conditions formatted in HTML. It's that easy.

The HTML can reside locally or on a server. Customers don't need to know it's HTML-formatted page because your view controller won't have an address bar in it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文