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

  • SEARCH
  • Home
  • 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 5977173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:19:58+00:00 2026-05-22T21:19:58+00:00

I have successfully embedded a vimeo video using a UIWebView. However because i have

  • 0

I have successfully embedded a vimeo video using a UIWebView. However because i have created this in code, i have to adjust the positioning in code and i would prefer to do it through interface builder. Correct me if im wrong, i read that initializing UIWebView with the initWithCoder method was the way to achieve this. However i am not to sure how to properly make use of this method, if it is at all the right one.

Here is a bit code to show what i have been doing so far:

- (void) viewDidLoad{
[super viewDidLoad];
[self embedVimeo:@"http://player.vimeo.com/video/19969613" frame:CGRectMake(300, 100, 260, 200)];
[self embedVimeo:@"http://player.vimeo.com/video/19967404" frame:CGRectMake(100, 300, 260, 200)];}


- (void)embedVimeo:(NSString *)urlString frame:(CGRect)frame {
NSString *embedHTML = @"\
<html><head>\
<style type=\"text/css\">\
body {\
background-color: transparent;\
color: white;\
}\
</style>\
</head><body style=\"margin:0\">\
<iframe src=\"%@\" type=\"application/x-shockwave-flash\" \
width=\"%0.0f\" height=\"%0.0f\"></iframe>\
</body></html>";
NSString *html = [NSString stringWithFormat:embedHTML, urlString, frame.size.width, frame.size.height];
/*UIWebView **/ videoView = [[UIWebView alloc] initWithFrame:frame];
[videoView loadHTMLString:html baseURL:nil];

[[[videoView subviews] lastObject] setScrollEnabled:NO];
[mainView addSubview:videoView];
[videoView release];

}

Any ideas?

Tod

  • 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-22T21:19:58+00:00Added an answer on May 22, 2026 at 9:19 pm

    It is my understanding that the initWithCoder is automatically used by the Objective-C runtime/Cocoa/CocoaTouch to accomplish what you are aiming at. So you don’t have to really worry about it.

    In short, if you create you UI in IB, say instantiate there a UIWebView object, define its connection a controller of yours, then you will be able to use that UIWebView directly without worrying about having to instantiate it.

    What I would do is:

    1. creating a new Web View in my nib;

    2. a controller/delegate for the WebView;

    3. connect the WebView delegate to the controller/delegate;

    4. connect the controller/delegate view to the WebView;

    5. connect the rootViewController of the main window to the controller/delegate.

    Once you make sure you have defined correctly all the outlets and connection, my simply loading this nib (which in case it is the MainMenu is done automatically), you’ll have all of those objects instantiated and ready to be used (by calling loadHTMLString: or whatever.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully implemented embedded vimeo videos into my app, however i would like
Using django-tinymce I have successfully embedded TinyMCE in the Admin before. Embedding it in
I have for the most part successfully embedded firefox/xulrunner into our c# application, but
I have successfully set up FILESTREAM on my SQL 2008 server; however I've noticed
I have successfully created an app that reads from a bundled .plist file and
I have been trying to follow this example (download the source code from a
I have successfully embedded Chromium into my Delphi 6 projects with the help of
I have successfully created my own virtual path provider to load a user control
i have a portrait view with an embedded video. When changing orientation to landscape,
I have successfully embedded mono into an existing iphone app. There are some issues

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.