IOS application options and text / HTML

Hey. I am trying to show a lot of static text in the application settings on the iPhone. I saw the iPhone application do this, and I'm trying to achieve the same result. The goal is for the user to go to the application settings page, and they can view the terms and conditions.

Any pointers? I can show Title or MultiValue lines, but they allow only short lines to be shown. Ideally, this should open a full page, formatted, possibly with HTML or line breaks.

I would like it to be available from the iPhone settings for the application (outside the application). Presumably using a set of settings and Root.plist.

+5
source share
3 answers

Thanks Rog - I used iExplorer to look at the Settings.bundle file in the purchased application that had it working: it is complicated, but here is how it is laid out.

Root.plist:

    <dict>
        <key>Type</key>
        <string>PSGroupSpecifier</string>
        <key>Title</key>
        <string>Terms &amp; 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 .";
+9
source

Use the UIWebView in the view controller and pass it your terms and conditions, formatted in HTML. It is easy.

HTML can be located locally or on the server. Customers do not need to know this page in HTML format because your view controller will not have an address bar.

0
source

:

UIWebView *web = [[UIWebView alloc] initWithFrame:YOUR_FRAME];

NSString *path = [[NSBundle mainBundle] pathForResource:@"terms and conditions" ofType:@"html"];
NSURL *url = [NSURL fileURLWithPath:path isDirectory:NO];
[web loadRequest:[NSURLRequest requestWithURL:url]];

[YOUR_VIEW addSubview:web];
[web release];

HTML .

, !

0

All Articles