I want to add a UIWebView to all the view present in the app. I am not getting the web view loaded as well as visible. Can some please help me on the same.
In order to get it working I created a Shared Web view class.
//.h Implementation
@interface WebViewAdds : UIWebView {
}
+ (WebViewAdds *) sharedWebView ;
@end
WebViewAdds *g_sharedWebView ;
@implementation WebViewAdds
+(WebViewAdds *) sharedWebView  
{
    if (g_sharedWebView == nil) {
        g_sharedWebView = [[WebViewAdds alloc] initWithFrame:CGRectMake(0, 400, 320, 60)];
        [g_sharedWebView setDelegate:self];
        NSString *urlAddress = @"http://www.google.com";
        NSURL *url = [NSURL URLWithString:urlAddress];
        NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
        [g_sharedWebView loadRequest:requestObj];
    }
    return g_sharedWebView;
}
- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code.
    }
    return self;
}
- (void)dealloc {
    [super dealloc];
}
@end
And in all the view controllers, I am calling the same as
-(UIWebView *) testWebView {
    return [WebViewAdds sharedWebView] ;
}
-(void) viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.testWebView];   
}
 
     
    