Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-17-2011, 10:24 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 10
wolkje is on a distinguished road
Post webview content question

I'm having the following problem or trouble:
in my iPad app I have an custom webview running, which I start by using an url request etc. The user can scroll around in the webview and go to other sites if they click on a link.

The problem or trouble is that I want to let the user switch to full screen by tapping a button. I'm doing this by using a pushview controller and I don't know how to get the same state that the user was in like in the small webview.
For when the user went to another site in the small webview. I only got the url of the first one, which is hardcoded using the url request.

Is there a way to get the url address from the small webview and use that to open the full screen webview. I think it's possible, seen enough newsapp allowing you to send a web link from the article your reading.
Or is there another way?
wolkje is offline   Reply With Quote
Old 01-17-2011, 10:34 AM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

My first thought is that you could implement the UIWebViewDelegate method:
Code:
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
This method is called each time a new page is loaded in the webview, for example when the user clicks on a link as you mentioned above. You can use this method to save the NSURLRequest's URL and use that whenever you want to load your full-screen webview.
smithdale87 is offline   Reply With Quote
Old 01-17-2011, 11:06 AM   #3 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 10
wolkje is on a distinguished road
Default

Quote:
Originally Posted by smithdale87 View Post
My first thought is that you could implement the UIWebViewDelegate method:
Code:
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
This method is called each time a new page is loaded in the webview, for example when the user clicks on a link as you mentioned above. You can use this method to save the NSURLRequest's URL and use that whenever you want to load your full-screen webview.
Thanks Smithdale87 for the fast reply. Currently I have the small webview in an IBOutlet and starting it with another button. So no use in delegate method. Still learning Objective C.
But with your suggestion I should make new class method for the small webview and put the above code in it as a required protocol. After this make a delegate with this new class (smallwebview).
wolkje is offline   Reply With Quote
Reply

Bookmarks

Tags
content, fullscreen, url, webview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 364
10 members and 354 guests
7twenty7, blueorb, dre, iAppDeveloper, iGamesDev, Mah6447, Morrisone, mottdog, sacha1996, Touchmint
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:38 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0