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 06-21-2011, 08:00 PM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 3
spaten0117 is on a distinguished road
Exclamation IBAction run when webview is loading

Hey Guys,
i want to show a refresh button in a view, if the webview is loaded. if the site is loaded, the refresh button shout be hided. i have already written the IBAction to hide and unhide the refresh button. momentarily i push on 2 btns to hide/unhide the refreshbutton. this should be run automatically if the site is loading

thx and best wishes from germany
spaten0117 is offline   Reply With Quote
Old 06-21-2011, 08:23 PM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Look into UIWebView delegate methods and use them to show/hide the button as appropriate.
baja_yu is offline   Reply With Quote
Old 06-21-2011, 09:05 PM   #3 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 3
spaten0117 is on a distinguished road
Unhappy

i dont think what u mean.
i think its a ifstatement how by the activity indicator

-(void)checkload {
if(webView.loading) {
[active. startAnimating];
}
spaten0117 is offline   Reply With Quote
Old 06-21-2011, 09:13 PM   #4 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Loading… > webViewDidStartLoad: > webViewDidFinishLoad:
baja_yu is offline   Reply With Quote
Old 06-21-2011, 09:56 PM   #5 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 3
spaten0117 is on a distinguished road
Default

sorry, but its my first xcode project

where do i set the
-(void)webViewDidStartLoad: (UIActionSheet *)hide;
{
}
-(void)webViewDidFinishLoad: (UIActionSheer *)unhide;
{
}


p.s
the
-(IBAction)hide: (id) sender {
refresh.hidden = YES;
}
-IBAction)unhide: (id) sender {
refresh.hidden = NO;
}

are in the MainViewController.m

Last edited by spaten0117; 06-21-2011 at 10:06 PM.
spaten0117 is offline   Reply With Quote
Old 06-21-2011, 10:08 PM   #6 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

That's not what the methods should look like. Take a look at the document in the link.
If you aren't familiar with concept of delegation I strongly suggest you read up on it right now as it's used extensively.

Take a look at this, very brief, introduction to delegation: Loading… That document also describes other core concepts that you need to know about.
baja_yu is offline   Reply With Quote
Reply

Bookmarks

Tags
ibaction, if statements, ifstatement, loading page, 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: 326
8 members and 318 guests
chemistry, Dnnake, iOS.Lover, lendo, leostc, Leslie80, pbart, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

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