I have an application what is a web wrapper.
I need to display a login page from the server into UIWebView
always when application become active
.
I tried in many ways but always if the user is logged second page is displayed and not login page(i don't have access to source page from server).
UIWebView
is made in storyboard
and only from code I load the request
[[NSURLCache sharedURLCache] removeAllCachedResponses];
[[NSURLCache sharedURLCache] setDiskCapacity:0];
[[NSURLCache sharedURLCache] setMemoryCapacity:0];
NSURL *url = [NSURL URLWithString:stringWithUrl];
NSURLRequest *request = [NSURLRequest requestWithURL:url
cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:20.0];
[self.viewWeb loadRequest:request];
Also I register the class for notification when application enter in background to destroy webview
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(resetInterfaceForCaseWhenApplicationBecomeInactive)
name:UIApplicationDidEnterBackgroundNotification
object:nil];
And in method what is trigger by notification
self.viewWeb.delegate = nil;
self.viewWeb = nil;
I don't know what can do more to solve this. Any suggestion?