|
|||||||||
|
|||||||||
|
|||
|
hi im making a tabbar app that has several webviews on it and im trying to get a network indication or activity indication to work but for some reason neither webViewDidStartLoad or webViewDidFinishLoad are being called as the pages load...
heres a snippet of my project, if anyone needs more info to help me ill package more of it Code:
//First View Controller.h
#import
@interface FirstViewController : UIViewController {
UIWebView *lei;
UIActivityIndicatorView *activityIndicator;
}
@property(nonatomic,retain) IBOutlet UIWebView *lei;
@property(nonatomic,retain) IBOutlet UIActivityIndicatorView *activityIndicator;
-(IBAction) goBack:(id)sender;
-(IBAction) goRefresh:(id)sender;
@end
//First Vier Controller.m
#import "FirstViewController.h"
@implementation FirstViewController
@synthesize lei, activityIndicator;
-(void)viewDidLoad {
[super viewDidLoad];
NSString *urlAddress = @"http://website.com";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[lei loadRequest:requestObj];
}
-(IBAction) goBack:(id)sender {
[lei goBack];
}
-(IBAction) goRefresh:(id)sender {
NSString *urlAddress = @"http://website.com";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[lei loadRequest:requestObj];
}
-(void)webViewDidStartLoad:(UIWebView *)lei {
[self.activityIndicator startAnimating];
}
-(void)webViewDidFinishLoad:(UIWebView *)lei {
[self.activityIndicator stopAnimating];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
- (void)viewDidUnload {
}
- (void)dealloc {
[super dealloc];
}
@end
//AppDelegate.h
#import
@interface LeiAppAppDelegate : NSObject {
UIWindow *window;
UITabBarController *tabBarController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
@end
//AppDelegate.m
#import "LeiAppAppDelegate.h"
@implementation LeiAppAppDelegate
@synthesize window;
@synthesize tabBarController;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
sleep(0);
[window addSubview:tabBarController.view];
}
- (void)dealloc {
[tabBarController release];
[window release];
[super dealloc];
}
@end
__________________
Download LEI Mobile and stay in touch with Limited Edition iPhone!! http://limitededitioniphone.com/software/ iPhone 3GS - 3.0 T-Mobile Computers: Dell i545s Operating Systems: Windows Vista OSX Leopard (iDeneb 10.5.8) MacBook5,2 OSX Leopard 10.5.8 |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AppleInsider: Maine's expanded MacBook program the 'largest of its kind' | hackint0sh | Latest Headlines | 0 | 06-30-2009 08:30 PM |
| [1.1.4] [iLiberty] Please can you help me decipher what kind of iphone i have - iLibe | igmolinav | Older Software Unlock Solution | 5 | 07-19-2008 06:41 PM |
| [Advice] what kind of coding language...for 3rd party apps? | saxosuper1600 | Free Toolchain Software | 1 | 03-25-2008 08:54 PM |
| Photos application running weird... Like some kind of bug... | JCMA90 | General | 2 | 12-06-2007 02:47 PM |
| Anyone kind enough to post an unpatched baseband firmware? | jyavenard | General | 3 | 09-06-2007 09:38 AM |
|
|