Essentially, I'd like to embed a mobile website inside of my app which contains a list of YouTube clips.
I've added a UIWebView to my ViewController, loaded up the site properly :
- (void) setUrl:(NSURL*) newUrl
{
[newUrl retain];
[url release];
url = [newUrl retain];
[newUrl release];
NSURLRequest* requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
}
And deallocated the Webview :
- (void)dealloc {
webView.delegate = nil;
[webView release];
[activityIndicator release];
[url release];
[super dealloc];
}
However, when I watch a YouTube clip with the WebView, then click "Done" and return to my Browser, the app starts behaving erratically. My "PageCurl" animations no longer run, and all my sound effects stop working.
Has anyone run into this before?
The application runs fine if no YouTube clip is loaded. Pages curl, views transition. Only after it does it start to mess up. My guess is a threading issue, since a similar issue crept up when we'd be moving between scenes inside of a UIAlertView response thread...
** Edit : Also NSURLRequests seem to be failing... does YouTube grab a hold of these things and not let go? when I return am I returning in a separate thread? **