//
//  ViewController.m
//  RJMWordpressBlog
//
//  Created by pgAgent on 7/10/2014.
//  Copyright (c) 2014 RJM Programming. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

@synthesize wv1;

- (void)viewDidLoad
{
	// Do any additional setup after loading the view, typically from a nib.
    NSString *strWebsiteUlr;
    strWebsiteUlr = [NSString stringWithFormat:@"http://www.rjmprogramming.com.au/wordpress/"];
    // Load URL
    
    //Create a URL object.
    NSURL *url = [NSURL URLWithString:strWebsiteUlr];
    
    //URL Requst Object
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    
    //Load the request in the UIWebView.
    [wv1 loadRequest:requestObj];
    
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    {
        wv1.scrollView.clipsToBounds = YES; //normal;
        wv1.scrollView.scrollEnabled = YES;
        wv1.scrollView.pagingEnabled = YES;
    }
    else
    {
        wv1.scrollView.clipsToBounds = YES;
        wv1.scrollView.scrollEnabled = YES;
        wv1.scrollView.pagingEnabled = YES;
    }
    
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    {
        wv1.scrollView.autoresizesSubviews = YES; //normal; //YES; //NO;
        //wv1.scrollView.zoomScale = 0.5;
        wv1.scalesPageToFit = YES; //NO;
    }
    else
    {
        wv1.scrollView.autoresizesSubviews=YES;  //NO; //YES
        wv1.scalesPageToFit = YES;
    }
    [super viewDidLoad];
   
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
