I’m to creating YouTube player from UIWebView as said in this YouTube tutorial. But when I try initialize string with format, I receive EXC_BAD_ACCESS code=1
here is my code:
NSString *youTubeVideoHTML = [NSString stringWithFormat:@"<html><head> <meta name =
\"viewport\" content = \"initial-scale = 1.0, user-scalable = no, width = 212\"/></head>
<body style=\"background:Black;margin-top:100px;margin-left:100px\"> <div><object
width=\"212\" height=\"172\"><param name=\"movie\" value=\"%@\"></param> <param
name=\"wmode\" value=\"transparent\"></param> <embed src=\"%@\" type=\"application/x-
shockwave-flash\" wmode=\"transparent\" width=\"212\" height=\"172\"></embed> </object>
</div></body></html>",myYoutubeLink];
I tried to put direct link to youtube video instead of %@, and it works good. But I need to put any youtube url. Where is my error? I can’t create string.
You have two %@, but only one parameter: