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 9171925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:13:46+00:00 2026-06-17T16:13:46+00:00

I have a simple web-application that im using native to build. My application consicts

  • 0

I have a simple web-application that im using native to build.

My application consicts of MainWindow.xlb with is filled with Native View Controller.

Within Native View Controller.m i have the following code:

http://pastebin.com/xXFc0JCW

Looked to messy to copy and paste in here.

I cant seem to understand where i’m going wrong and why my application/ UIWebView always stays portrait.

Im new to iOS development.

Full source code: https://www.dropbox.com/s/i9woti5ptecr9n4/Native.zip

  • 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-06-17T16:13:47+00:00Added an answer on June 17, 2026 at 4:13 pm

    Now it works:

    NativeAppDelegate.m

    #import "NativeAppDelegate.h"
    #import "NativeViewController.h"
    
    @implementation NativeAppDelegate
    
    @synthesize window;
    @synthesize viewController;
    
    
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
        // Override point for customization after app launch    
    
        [self.window setRootViewController:viewController];
    
        return YES;
    }
    
    
    - (void)dealloc {
        [viewController release];
        [window release];
        [super dealloc];
    }
    
    @end
    

    NativeViewController.m

    #import "NativeViewController.h"
    
    @implementation NativeViewController
    
    @synthesize webView;
    
    
    // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
    - (void)viewDidLoad {
        [super viewDidLoad];
        NSString *filePath = [[NSBundle mainBundle] pathForResource:@"login" ofType:@"html"];
        NSData *htmlData = [NSData dataWithContentsOfFile:filePath];
    
    
        if (htmlData) {
            NSBundle *bundle = [NSBundle mainBundle]; 
            NSString *path = [bundle bundlePath];
            NSString *fullPath = [NSBundle pathForResource:@"login" ofType:@"html" inDirectory:path];
            [webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:fullPath]]];
        }
    }
    
    - (void)didReceiveMemoryWarning {
        // Releases the view if it doesn't have a superview.
        [super didReceiveMemoryWarning];
    
        // Release any cached data, images, etc that aren't in use.
    }
    
    - (void)viewDidUnload {
        // Release any retained subviews of the main view.
        // e.g. self.myOutlet = nil;
    }
    
    
    - (void)dealloc {
        [webView release];
        [super dealloc];
    }
    
    @end
    

    And I also unchecked ScaleToFill in the WebView in InterfaceBuilder otherwise you had to scroll the page to see your hello world.

    I removed the Methods for orientation and set the RootviewController for your Window to your ViewController. Your window did not have a RootVieController.

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

Sidebar

Related Questions

I have a simple web browser embedded in an application that allows a user
I have an extremely simple web application running in Tomcat using Spring 3.0.2, Hibernate
I'm building a simple web application that handles a simple database using struts and
So, I have a simple REST web application and if my Controller calls the
I have a very simple web application that have to read and write in
I have a web application that I deploy using JBoss 5.2. In order for
I have a simple Java web application using HSQLDB embedded database. The application is
I have a Java web application that uses CometD. The workflow is simple: I
I have been asked to build a rather simple form processor application that interacts
I have a simple web application with database tables orders and products that I'm

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.