[英]UIWebView or UIScrollView for HTML like View in iPhone Application
Sorry for this simple question but I am looking for the design pattern for adding a simple HTML like page to an iPhone app. 对于这个简单的问题我很抱歉,但我正在寻找将简单的HTML页面添加到iPhone应用程序的设计模式。
My intuition tells me that making a View with a full screen WebView inside is obviously the easiest option, but I think a UIScrollView is better. 我的直觉告诉我,使用全屏幕WebView制作一个View显然是最简单的选择,但我认为UIScrollView更好。
What's the best practice? 什么是最佳做法?
I basically want to have some text, float some images, add a few links etc. 我基本上想要一些文本,浮动一些图像,添加一些链接等。
Should I use WebView or ScrollView? 我应该使用WebView还是ScrollView?
Thank you, 谢谢,
Kent 肯特
Well you're going to need a UIWebView
if you want to display the contents of a local or remote web page. 如果要显示本地或远程网页的内容,那么您将需要
UIWebView
。 You would want to use a UIScrollView
if you wanted to draw all of the content programmatically. 如果要以编程方式绘制所有内容,则需要使用
UIScrollView
。
I think you want a UIWebView
. 我想你想要一个
UIWebView
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.