views:

220

answers:

1

In a UIWebView, I provide a link to http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html. In the simulator, TOC doesn't load. A space for it appears then quickly hides. However, on the iPhone, TOC loads and doesn't hide. User has to click the hide TOC link. What is the simulator doing that the iPhone isn't? Is there a way to do that on the iPhone so TOC is hidden?

+2  A: 

I don't know what the subtle difference is between the simulator and the device (something cookie related?), but I would suggest that your solution should be to wait until the page finishes loading and then inject the javascript to forcibly close the TOC, as with:

[webView stringByEvaluatingJavaScriptFromString:@"showHideTOC('hide');"];
ddoughty
4thSpace
Disregard last comment. It only happens in simulator. Would have deleted comment and reposted but "x" is scrolling off the page because of my crazy link.
4thSpace