1 に答える
It seems like you're doing the same thing multiple times in this code. For example, you create a new NSURLRequest object even though one was already passed inside of the delegate method? You also run the synchronous dataWithContentsOfURL method after creating a new NSURLConnection? You also append some data into a property only to do nothing with that property?
What you probably want to do is create a new asynchronous NSURLConnection when the UIWebView should load. From there, allow the UIWebView to load that page. Inside of your delegate methods, instead of appending the data to some property, append the downloaded data to a file. When the connection finishes downloading, present your alert informing the user that the data was downloaded and saved.