I have this following piece of code, which loads UIWebView properly on one Wifi but doesn’t on another WiFi. It again works properly on 3G.
tempWebView = [[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
tempWebView.delegate = self;
tempWebView.scalesPageToFit = YES;
[tempWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"www.example.com/Contact.html"]]];
I tried NSLogging and it seems the webViewDidFinishLoad: is not getting called on 2nd Wifi.
Could I blame network 2 or is there something I need to check?
This issue is quite sure not related to your code. Perhaps the one WiFi just had no internet connection!? Or there was some strange network setup? Did Safari or other apps work in there?
If your code works in 3G, or in a single WiFi, than your code is fine.