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 07-11-2010, 01:45 PM   #1 (permalink)
New to the SDK
 
franzwarning's Avatar
 
Join Date: Jul 2010
Location: Portland, Oregon
Age: 19
Posts: 165
franzwarning is on a distinguished road
Send a message via AIM to franzwarning Send a message via Skype™ to franzwarning
Default ActivityIndicator In the Status Bar

Here is my code:

Code:
-(IBAction)thumbsUpButtonPressed:(id)sender
{
	[myWebView reload];
	
}

- (void)webViewDidStartLoad:myWebView
{
	[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
}

- (void)webViewDidFinishLoad:myWebView
{
	[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;

}
I am trying to get the activity indicator in the status bar but this doesn't seem to work.
franzwarning is offline   Reply With Quote
Old 07-11-2010, 01:49 PM   #2 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Those are not proper method names.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 07-11-2010, 02:18 PM   #3 (permalink)
New to the SDK
 
franzwarning's Avatar
 
Join Date: Jul 2010
Location: Portland, Oregon
Age: 19
Posts: 165
franzwarning is on a distinguished road
Send a message via AIM to franzwarning Send a message via Skype™ to franzwarning
Default

If I do it like this:

Code:
-(IBAction)thumbsUpButtonPressed:(id)sender
{
	[myWebView reload];
	[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
}
the Status Bar Indicator never stops and I don't know where to put the:
Code:
	[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
line of code...

Any recommendations?
franzwarning is offline   Reply With Quote
Old 07-11-2010, 02:32 PM   #4 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

The approach was correct. The method names were not.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 07-11-2010, 03:34 PM   #5 (permalink)
New to the SDK
 
franzwarning's Avatar
 
Join Date: Jul 2010
Location: Portland, Oregon
Age: 19
Posts: 165
franzwarning is on a distinguished road
Send a message via AIM to franzwarning Send a message via Skype™ to franzwarning
Default

thanks!
franzwarning is offline   Reply With Quote
Old 07-11-2010, 03:41 PM   #6 (permalink)
New to the SDK
 
franzwarning's Avatar
 
Join Date: Jul 2010
Location: Portland, Oregon
Age: 19
Posts: 165
franzwarning is on a distinguished road
Send a message via AIM to franzwarning Send a message via Skype™ to franzwarning
Default

So would it be like this?

Code:
-(IBAction)thumbsUpButtonPressed:(id)sender
{
	[myWebView reload];
	webViewdidStartLoad:(UIWebView *)myWebView;
	[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
	webViewDidFinishLoad:(UIWebView *)myWebView;
	[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;

}

Sorry for all the posts...I'm new to this stuff.
franzwarning is offline   Reply With Quote
Old 07-11-2010, 03:59 PM   #7 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Oh geez, it's getting worse with each post. Go get yourself a good book on the subject. You need a lot more help than you're going to get on forums.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 07-11-2010, 03:59 PM   #8 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by franzwarning View Post
Here is my code:

Code:
-(IBAction)thumbsUpButtonPressed:(id)sender
{
	[myWebView reload];
	
}

- (void)webViewDidStartLoad:myWebView
{
	[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
}

- (void)webViewDidFinishLoad:myWebView
{
	[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;

}
I am trying to get the activity indicator in the status bar but this doesn't seem to work.
Dude, Brian is telling you what's wrong He's just being his usual laconic self about it. The method declarations you have above have syntax errors. They should look like this:

Code:
- (void)webViewDidFinishLoad:(UIWebView *)webView
- (void)webViewDidStartLoad:(UIWebView *)webView
You are missing the type declaration of the webView parameter in both the above methods. The compiler probably gave you a warning. Fix those two method declarations and your approach should work.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 07-11-2010, 09:06 PM   #9 (permalink)
New to the SDK
 
franzwarning's Avatar
 
Join Date: Jul 2010
Location: Portland, Oregon
Age: 19
Posts: 165
franzwarning is on a distinguished road
Send a message via AIM to franzwarning Send a message via Skype™ to franzwarning
Default

Ughh sorry I hate to keep asking you guys this but I just can't seem to figure out what you mean by "type declaration of the webView parameter". Can you elaborate just a bit more?

Thanks a ton,
George
franzwarning is offline   Reply With Quote
Old 07-11-2010, 09:20 PM   #10 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Go to the documentation. Find the entry for UIWebViewDelegate. Find the appropriate methods. Notice how they differ from what you tried originally.

Copy them from the documentation, paste them into your code.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 07-11-2010, 10:08 PM   #11 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by Duncan C View Post
Dude, Brian is telling you what's wrong He's just being his usual laconic self about it. The method declarations you have above have syntax errors. They should look like this:

Code:
- (void)webViewDidFinishLoad:(UIWebView *)webView
- (void)webViewDidStartLoad:(UIWebView *)webView
You are missing the type declaration of the webView parameter in both the above methods. The compiler probably gave you a warning. Fix those two method declarations and your approach should work.
My post above tells you EXACTLY what you need to know. If you can't figure it out, consider a different line of work.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Reply

Bookmarks

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: 331
16 members and 315 guests
akphyo, alexP, appservice, cgokey, EXOPTENDAELAX, flamingliquid, guusleijsten, mariano_donati, ohmniac, Paul Slocum, PavelSea, SLIC, Sloshmonster, Sonuye857, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,653
Threads: 94,115
Posts: 402,888
Top Poster: BrianSlick (7,990)
Welcome to our newest member, ohmniac
Powered by vBadvanced CMPS v3.1.0

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