简体   繁体   English

iPhone SDK:首选项

[英]iPhone SDK: Preferences

I wanted an entire page of text(multiple lines) in my settings similar to the one on iphone: settings->general settings->About->Legal 我希望在我的设置中使用一整页文本(多行),类似于iphone上的设置>“设置”->“常规设置”->“关于”->“法律”

I have not been able to do so. 我无法这样做。 I tried entering title in PSGroupSpecifier, it gives me multiple lines but with a gray background. 我尝试在PSGroupSpecifier中输入标题,它为我提供了多行,但背景为灰色。 i wanted a white background. 我想要一个白色背景。 Any help would be highly appreciated. 任何帮助将不胜感激。

Thanks in advance 提前致谢

Use a UIWebView and store your page as a HTML file in your resources. 使用UIWebView并将页面作为HTML文件存储在资源中。

  // Create the UIWebView
  UIWebView *webView = [[[UIWebView alloc] initWithFrame:self.view.frame] autorelease];

  // Add the UIWebView to our view  
  [self.view addSubview:webView];

  // Load the HTML document from resources
  NSString *pagePath = [[NSBundle mainBundle] pathForResource:@"legal" ofType:@"html"];
  NSURL *pageURL = [NSURL fileURLWithPath:pagePath];
  NSURLRequest *pageReq = [NSURLRequest requestWithURL:pageURL];
  [webView loadRequest:pageReq];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM