How to Add a Toolbar to Your iOS App
How to Customize Xcode for Your iPad App
How to Set Up a WeatherController in the Main_iPad.storyboard file for Your iOS App

Text and Web Views in iOS Apps

Text and Web views provide a way to display formatted text in your iPhone or iPad application. The UITextView class supports the display and editing of multiple lines of text in a scrollable area. The UIWebView class provides a way to display HTML content.

These views can be used as the Main view, or as a subview of a another view. (You encounter UIWebView in the example RoadTrip app as Weather views.) UIWebView is also the primary way to include graphics and formatted text in Text Display views.

image0.jpg

The views that display content — such as the Detail views shown in the figures — are Web views, for some very good, practical reasons:

  • Some views must be updated regularly. Web views, in that context, are the perfect solution; they make it easy to access data from a central repository on the Internet. (Client/server is alive and well!)

  • Web views can easily display formatted data that’s locally stored. Real-time access isn’t always necessary — sometimes it’s perfectly fine to store some data on the iPad or iPhone. Web views have no problem with locally stored data, which is very handy.

  • Web views can access websites! Don’t overlook the obvious: Web views open the door to websites, which means you have the whole Internet at your beck and call. If users want more detailed weather information, for example, they can get to the ten-day forecast by simply touching a link.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
How to Customize Your iOS App Table View for the iPad
How to Add a Background Image to Your iOS App
How to Add the Events Controller to Your iOS App
How to Add a New View Controller to Your iOS App
How to Add the Weather View Controller to Your iOS App
Advertisement

Inside Dummies.com