Hi i want to make a few http request and generate html from within my ipod app. I hear i want a WebView to view the html as if it were a browser. So my question is how do i make the http request? How do i parse json (or xml) and how do i save/load data? I figure i can use webstorage to load/save the data however i am thinking since its an ipod app i have a better way of storing it?
2
There are 2 best solutions below
0
yarlg
On
Here is the working code snippet. for iPod/iPhone/iPad; Works with iOS7 and iOS6.. I have not tested in others...
UIWebView *_webView = [[UIWebView alloc] initWithFrame:self.view.frame];
[self.view addSubview:_webView];
NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[_webView loadRequest:request];
Related Questions in IOS
- Overlapping UICollectionView in storyboard
- Cannot pod spec lint because of undeclared type errors
- Is the transactionReceipt data present in dataWithContentsOfURL?
- UIWebView Screen Fitting Issue
- ZXingObjC encoding issues
- iOS: None of the valid provisioning profiles allowed the specific entitlements
- How to hide "Now playing url" in control center
- CloudKit: Preventing Duplicate Records
- Slow performance on ipad erasing image
- Swift code with multiple NSDateFormatter - optimization
- iOS 8.3 Safari crashes on input type=file
- TTTTimeIntervalFormatter always returns strings in English
- How do I add multiple in app purchases in Swift Spritekit?
- Setup code for xibs in iOS. -awakFromNb:
- iOS Voice Over only reads out the title of any alert views
Related Questions in WEB
- What is the point of definnig Asp.net Intrinsic Objects In different places and what is the different betwen them?
- how to prepend www if the url string does not has www?
- @Value annotation not resolved in a class that belongs to dependency jar
- referral link isn't being locked to one ip
- Under what conditions does href="#" cause scrolling to the top of the page?
- Webpage - Font size of table items on mobile phone browsers changes
- Web Service Error path property must set before calling the send method
- Calling ASP webpage from C# application
- What is the best way to make two web pages communicate between each other back and forth?
- CSS Different screen resolution
- How can hide url value in php
- HTML Control Form with PHP - Errors
- How would I use an only for IE8 and not for any other browser
- Client side computation without exposing code?
- detecting a file downloaded in selenium java
Related Questions in WEBVIEW
- How to resolve browser crash issue in JavaFX?
- Error:(29, 6) Error: The element type "input" must be terminated by the matching end-tag "</input>"
- Sencha touch lib not working on Chrome 43
- Controlling navigation in the Android WebView class
- UIWebView contents are not showing
- Implementing a custom header bar for chromiumembedded
- Android webview append css to existing site
- Get javascript var from webview to android var
- jquery prob in WebView of Android 4.4
- WebView not responding to Keyboard input
- how to get the URL from mainActivity to the second activity using intents?
- Unable to Full Screen Youtube Video Inside Custom Webview
- Android: NullRefException on creating WebView
- How to add a WebView as a content to a tab in JavaFX?
- How to load a javascript redirect into android webview?
Related Questions in IPOD
- USB keeps disconnecting...only for mobile devices
- Sound get distorted for MPMoviePlayerController and AVAudioPlayer when application kept idle for more than 48 hrs in IPOD
- Define my own UIControlEvent
- Firebase issue - no response from Realtime database on iPod with iOS 8.3
- Automatic turning on an android mtk
- Making calls on iPhone/iPod/iPad
- info : How to make an iphone app read data from internet
- Play Multiple iPod Library Songs On iPhone At The Same Time With Pitch Bending & Other Effects
- Get album year for item in iPod library?
- Crash on UITableView when scrolling
- Shuffle Mode with iPod... help ... Objective C
- View Html in ios/ipod Apps
- How do I pop the view controller underneath a pushed view controller?
- Getting error request for member 'indexPath' in something not a structure or union when compiling
- Receiving Notifications with App in background mode
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Here's a snippet to load a local html web page contained inside your app bundle:
Another alternative is to embed a local web server running in a background thread, and use a URL to localhost.
A UIWebview supports HTML5 local storage.