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-10-2011, 10:50 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 4
iJohnwickham is on a distinguished road
Default Pull Down to Update

I have a tab bar app with a UIWebView in both tabs. One displaying Facebook, the other Twitter. I want to add the 'Pull Down to Update' feature, as seen in the Facebook app. Pull all the way down, the page reloads.

How can I add this to the UIWebView?
iJohnwickham is offline   Reply With Quote
Old 01-10-2011, 11:38 PM   #2 (permalink)
Mad Dog
 
Join Date: Nov 2009
Location: Melbourne, AUS
Posts: 39
maddogsoftware is on a distinguished road
Default

Quote:
Originally Posted by iJohnwickham View Post
I have a tab bar app with a UIWebView in both tabs. One displaying Facebook, the other Twitter. I want to add the 'Pull Down to Update' feature, as seen in the Facebook app. Pull all the way down, the page reloads.

How can I add this to the UIWebView?
There's some great resources showing how to implement Pull to Update (or refresh) when using a tableView:
(this one springs to mind iPhone Pull to Refresh - Leah Culver's Blog)
but you're going to have to adapt them in order to work with UIWebView.

The basic technique used to implement this functionality usually seems to be:
1. Add a view with the "Pull to Refresh" message and details to a UIScrollview (or subclass) and set it's frame so that it is above the top of your UIScrollview.
2. Connect a delegate to the UIScrollview and listen for the scrollViewDidScroll messages.
3. When you receive a message that the view been scrolled far enough upwards you can perform any update processing you need and reload the subviews.

I realise this is all pretty high level but it might be enough to get you started.

If you're still figuring things out I'd suggest getting the example from the page I linked, understanding it a little then trying to implement your own in order of the steps described above... hopefully I didn't miss anything.

Last edited by maddogsoftware; 01-10-2011 at 11:41 PM.
maddogsoftware is offline   Reply With Quote
Old 01-11-2011, 11:04 AM   #3 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 4
iJohnwickham is on a distinguished road
Default

Quote:
Originally Posted by maddogsoftware View Post
[url=http://blog.leahculver.com/2010/12/iphone-pull-to-refresh.html]
I used this resource ^ and found it helpful, however, it tells you to 'link against the QuartzCore framework. I don't understand this... What is the QuartzCore Framework, how do I link it, what do I link it to, where, and how!?!
iJohnwickham is offline   Reply With Quote
Old 01-11-2011, 11:10 AM   #4 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 236
moezzz is on a distinguished road
Default

Quote:
Originally Posted by iJohnwickham View Post
I used this resource ^ and found it helpful, however, it tells you to 'link against the QuartzCore framework. I don't understand this... What is the QuartzCore Framework, how do I link it, what do I link it to, where, and how!?!


Go to Framework folder and right-click.. then add existing Framework.. choose QuartzCore.Framework

And compile.




------------ Check out my Free/Awesome Apps ---------------

EASYCOPY - Send Texts Over Wi-Fi like what they do in a sci-fi movie
moezzz is offline   Reply With Quote
Old 06-07-2011, 09:43 AM   #5 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 4
mcreisi is on a distinguished road
Default

Hi,

Did you find a way to make pull to refresh work on a webview?
It would be great if you have a tutorial for me.
I also have an tabbar controller with 3 tabs. each of them having a webview.

thank you and best regards,
Roman
mcreisi is offline   Reply With Quote
Reply

Bookmarks

Tags
pull down to reload, reload page, uiwebview, uiwebview facebook, uiwebview twitter

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: 356
10 members and 346 guests
7twenty7, blueorb, fredidf, 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:35 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0