// // ServicekarmaWebSite.m // Servicekarma // // Created by Logictree on 25/06/14. // Copyright (c) 2014 Logictree. All rights reserved. // #import "ServicekarmaWebSite.h" @interface ServicekarmaWebSite () @end @implementation ServicekarmaWebSite @synthesize webView; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } // Programmatically set the WebView TopSpace Constraints. - (void)updateViewConstraints { [super updateViewConstraints]; self.webViewTopSpaceConstant.constant=[UIScreen mainScreen].bounds.size.height > 480.0f ? 0:85; } -(void)showTimeOutError { [self removeLoader]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:TIMEOUT_MSG delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; [alert show]; } - (void)viewDidLoad { [super viewDidLoad]; // ServiceKarma Website display on WebView. NSString *strURL = @"http://servicekarma.com/"; NSURL *url = [NSURL URLWithString:strURL]; NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url]; [self.webView loadRequest:urlRequest]; [[self navigationController] setNavigationBarHidden:NO animated:YES]; // BackButton Image Display. [self setLeftBarButtonOnNavigationBarAsBackButton]; // ServiceKarma Logo Display. [self setCenterButtonOnNavigationBar]; } -(void)webViewDidStartLoad:(UIWebView *)webView { [self showLoader:showLoaderWithOutTabBar]; } -(void)webViewDidFinishLoad:(UIWebView *)webView { [self removeLoader]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } @end