I implemented UIWebview with navigation bar and any new visited page will be added to the navigation stack but the problem is when I hide some element before pushing the new view and go back to the same page the element stays hidden even if I show it again
Here is My JS code
jQuery(document).ready(function(){
$('#hello').fadeIn('slow');});
$('.facebook,.location, .mainItem').hide();
$('.facebook,.location, .mainItem').show();
$('.contactIcon').click(function(e){
e.preventDefault();
$('.facebook,.location, .mainItem').fadeOut('slow', function() {
window.location = "contact.html";
});
});
and here is the Objective-C Code
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
DrillDownWebExampleAppDelegate *appDelegate =
(DrillDownWebExampleAppDelegate *)[[UIApplication sharedApplication] delegate];
if(navigationType == UIWebViewNavigationTypeOther)
{
NSURL *url2 = [request URL];
NSString *URLStr = [url2 absoluteString];
RootViewController* viewController = [[RootViewController alloc] init];
NSString *holder = [self getQueryStringInner:URLStr];
[self getQueryString:URLStr];
if([holder length] != 0 )
{
appDelegate.title =@"Title";
appDelegate.query = queryString;
[self.navigationController pushViewController:viewController animated:YES];
[viewController release];
return NO;
}
}
return YES;
}
Can you please help with that ?
I did a small trick but I think there is another way
I showed the elements again after window.location
It works like this