Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6352717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:16:34+00:00 2026-05-24T22:16:34+00:00

Its the first time that I use UIWebView and the first time that I

  • 0

Its the first time that I use UIWebView and the first time that I use video in iPhone.
The video plays, BUT:

I want to have an old school tv (round corners) in foreground with switches and so on. The tv is an image with transparent pixels in the middle, so that a video lying behind the tv will shine through as if the video would be shown on the tv.

But first of all the video has a border that I can’t remove and second it’s always in the foreground. In Safari and in Firefox on Mac it’s working. So is it an iPhone thing, could it be that it simply won’t work on iPhone ? Or do I have some css/html typos ?

I’m using this code:

- (void)embedYouTube:(NSString *)urlString frame:(CGRect)frame {
  NSString *embedHTML = @"\
  <html><head>\
  <style type=\"text/css\">\
  body {\
  background-color: black;\
  }\
  #container{\
  position: relative;\
  z-index:1;\
  }\
  #video,#videoc{\
  position:absolute;\
  z-index: 1;\
  border: none;\
  }\
  #tv{\
  background: transparent url(tv.png) no-repeat;\
  width: 320px;\
  height: 205px;\
  position: absolute;\
  top: 0;\
  z-index: 999;\
  }\
  </style>\
  </head><body style=\"margin:0\">\
  <div id=\"tv\"></div>\
  <object id=\"videoc\" width=\"240\" height=\"160\">\
  <param name=\"movie\" value=\"%@\"></param>\
  <param name=\"wmode\" value=\"transparent\"></param>\
  <embed wmode=\"transparent\" id=\"video\" src=\"%@\" type=\"application/x-shockwave-flash\" \
  width=\"240\" height=\"160\"></embed>\
  </object>\
  </body></html>";
  NSString *path = [[NSBundle mainBundle] bundlePath];
  NSURL *baseURL = [NSURL fileURLWithPath:path];      
  NSString *html = [NSString stringWithFormat:embedHTML, urlString,urlString];
  UIWebView *videoView = [[UIWebView alloc] initWithFrame:frame];
  [videoView loadHTMLString:html baseURL:baseURL];
  [self.view addSubview:videoView];
  [videoView release];      
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:16:35+00:00Added an answer on May 24, 2026 at 10:16 pm

    I have not found a css/html/js solution.

    So now I add the TV.png to a UIImageView and lay that view on top of the UIWebView, it’s working and not that big of a hack, so I will go with it, but maybe someone can still answer the original question ?

    So my current layer order is now:

    UIView
      add: UIWebView
      add: UIImageView (with UIImage TV.png)  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's the first time that I want to use a downloaded SDK. What is
It's the first time I use java Rmi*. I have a custom class which
I have a native iPhone app that just loads a website using UIWebView .
hii its the first time i use database in c#. i am trying to
I have some unsolved issue with threads. It's my first time doing it. I
I have a program that depends on an external shared library, but after a
This is my first time using IB, but after spending a one or two
Background: I'm starting to use Django for the first time, which is also my
I have a DDL (#engine) that needs to have its option values set via
Ok first, please assume that this is the first time I will be writing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.