Here is my code.. hopefully you guys can help me!
When I run the app with internet and close internet later it works perfect, but whenever I start it without internet it won't show the image..
[super viewDidLoad];
[webView loadRequest: [NSURLRequest requestWithURL:
[NSURL URLWithString:@"http://www.google.nl"]]];
Reachability * reach = [Reachability reachabilityForInternetConnection];
UIImageView *RbackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image"]];
reach.reachableBlock = ^(Reachability * reachability)
{
dispatch_async(dispatch_get_main_queue(), ^{
[RbackgroundView removeFromSuperview];
});
};
reach.unreachableBlock = ^(Reachability * reachability)
{
dispatch_async(dispatch_get_main_queue(), ^{
[self.webView addSubview:RbackgroundView];
[self.webView bringSubviewToFront:RbackgroundView];
});
};
[reach startNotifier];
}