Note that there are some explanatory texts on larger screens.

plurals
  1. POYoutube - iPhone - displaying UIWebView of video
    primarykey
    data
    text
    <p>I have a script in my app that loads a Youtube link in a section of the UIView, the link is provided by my server (mySQL/using php) and from that it is loaded... this script below works fine..... however...</p> <p>Here is what I have right now, I was looking to remove the programmatically part (where it gives the dimensions and possibly replace it with a UIWebView) to it, so I could improvise using IB, this will help when my application launches, a quick animation occurs and then I want this youtube link to load and display after viewDidLoad is completed.</p> <p>.h file:</p> <pre><code>- (void)embedYouTube:(NSString *)urlString frame:(CGRect)frame; </code></pre> <p>.m file</p> <pre><code>//view did load function... [self embedYouTube:youtubestring frame:CGRectMake(69,72,184,138)]; //after the view did load is closed I have.. - (void)embedYouTube:(NSString *)urlString frame:(CGRect)frame { NSString *embedHTML = @"\ &lt;html&gt;&lt;head&gt;\ &lt;style type=\"text/css\"&gt;\ body {\ background-color: transparent;\ color: white;\ }\ &lt;/style&gt;\ &lt;/head&gt;&lt;body style=\"margin:0\"&gt;\ &lt;embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \ width=\"%0.0f\" height=\"%0.0f\"&gt;&lt;/embed&gt;\ &lt;/body&gt;&lt;/html&gt;"; NSString *html = [NSString stringWithFormat:embedHTML, urlString, frame.size.width, frame.size.height]; UIWebView *videoView = [[UIWebView alloc] initWithFrame:frame]; [videoView loadHTMLString:html baseURL:nil]; [self.view addSubview:videoView]; [videoView release]; } </code></pre> <p>any help would greatly be appreciated!! thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload