Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import "NativeViewController.h"
- @implementation NativeViewController
- @synthesize webView;
- /*
- // The designated initializer. Override to perform setup that is required before the view is loaded.
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
- if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
- // Custom initialization
- }
- return self;
- }
- */
- /*
- // Implement loadView to create a view hierarchy programmatically, without using a nib.
- - (void)loadView {
- }
- */
- -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
- if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
- return YES;
- }else{return YES;}
- }
- -(BOOL)shouldAutorotate{return YES;};
- // 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]]];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment