title: how to load pdf file in UIWebview center
body: <p>I am new in ios developement.I am trying to display a pdf in a UIWebview center.i have a pdf in mainbundle.Here is what my PDF looks like now when loaded in a UIWebView: (I put in a brown gradient as the UIWebView's background so you can see what I mean better).
  <img src="https://i.stack.imgur.com/6qdf5.png" alt="enter image description here"></p>
  
  <pre><code>- (void)viewDidLoad
  {
  UIWebView *theWebView = [[UIWebView alloc] initWithFrame:[self.view bounds]];
  [theWebView setContentMode:UIViewContentModeScaleAspectFit];
  [theWebView setAutoresizingMask:UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth];
  [theWebView setScalesPageToFit:YES];
  NSString *filePath = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"pdf"];
  NSURL *filePathURL = [NSURL fileURLWithPath:filePath];
  [theWebView loadRequest:[NSURLRequest requestWithURL:filePathURL]];
  
  [self.view addSubview:theWebView];
  [super viewDidLoad];
  }
  </code></pre>
  
  <p>I would like to centre that so that the bottom margin is the same as the top margin. How would I do this with a PDF (local)?</p>