Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Using UIWebView

For our purposes, we’re going to need to generate an HTML version of our fugitive description and last known location. We can then apply some basic CSS to get it to look however we want. We’re going to be working with CSS to actually draw the notebook paper area within the view, so it won’t be an image. We’re also going to set up the pushpin image directly from the CSS so it will stay within the WebView and move and scale as needed for the view.

To do this we’re going to need to make a couple of changes. First, we need to swap out our text views for UIWebViews. That’s pretty straightforward.

Next, we need to generate the HTML. We can use NSString’s stringWithFormat to do that. Normally it’s a lot easier to write the HTML and CSS you want and get things set up using a Web Browser or any other HTML editing tool, and then move it into code. We came up with HTML that looks like what you see on the opposite page:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial