开发者

Creating Downloadable Content

Sorry for the silly question, but I am looking at many news apps (The Daily, etc) and they appear to have downloadable Views开发者_如何学编程 or something. The interaction with the views seems a lot like UIViews. Are they using downloadable UIViews or WebViews to see that content? If they are using UIViews, how is this done?


There are at least two approaches you can take when you want to display content from a server.

  1. Implement your UI using iOS UI components. For that you would use UIView as a container for the data, a UIActivityIndicator to show that you are downloading the data from the server, either in form of XML or JSON format. Then you would present those data using iOS UI components such as UITextArea, UILabel, UIImageView and so on.

  2. Implement a simple UIWebView and give it a url with the content that resides on your web server. The advantage of this solution is that you can manipulate the way the content looks from your server site when the app is already in the App store. You will not be able to do it with the first approach.

Most of the apps use the first approach, but if you don't have much time and want to do it in a dirty fast way use the second approach.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜