title: How to implement google map SDK for iOS to iPhone 4
body: <p>I try to show custom map view using Google Maps SDK for iOS on iPhone 4 and iPhone 5 on simulator.</p>
  
  <p>I create a UIViewController class for Google map
  Here is code</p>
  
  <p>//GoogleMapViewController.h</p>
  
  <pre><code>#import &lt;GoogleMaps/GoogleMaps.h&gt;// for google map
  
  @interface GoogleMapViewController : UIViewController{
  
      GMSMapView *mapView_;
  }
  </code></pre>
  
  <p>//GoogleMapViewController.m</p>
  
  <pre><code>- (void)viewDidLoad
  {
  [super viewDidLoad];
  
  GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:13.909366 longitude:100.517446 zoom:5];
  mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
  mapView_.myLocationEnabled = YES;
  self.view = mapView_;
  }
  </code></pre>
  
  <p>and I load GoogleMapViewController to subview like this </p>
  
  <p>//RealTimeMonitoring.h</p>
  
  <pre><code>@interface RealTimeMonitoring : UIViewController &lt;UITableViewDataSource, UITableViewDelegate&gt;
  
  @property (strong, nonatomic) IBOutlet UIView *googleMapView;
  @end
  </code></pre>
  
  <p>//RealTimeMonitoring.m</p>
  
  <pre><code>#import "GoogleMapViewController.h"
  
  - (void)viewDidLoad
  {
  [super viewDidLoad];
  
  GoogleMapViewController *googleViwController = [[GoogleMapViewController alloc] initWithNibName:@"GoogleMapViewController" bundle:nil];
  googleViwController.view.frame = self.googleMapView.bounds;
  [self.googleMapView addSubview:googleViwController.view];
  }
  </code></pre>
  
  <p>When I run it on iPhone 5 simulator it show correctly and the center of camera on map view look OK</p>
  
  <p><img src="https://i.stack.imgur.com/eqerk.png" alt="iPhone5 Result"></p>
  
  <p>But when I run it on iPhone  simulator it seem to cut lower part a bit but the camera still center like it</p>
  
  <p><img src="https://i.stack.imgur.com/dq5XA.png" alt="iPhone4 Result"></p>
  
  <p>When I coding game using Coco2d I recall that I must set the size or init view according to the device. But when I use interface builder I don't know how.</p>
  
  <p><strong>Question: How can I make it show like iPhone 5 on iPhone 4</strong> </p>
  
  <p>Ps. I still using macbook pro 13-inch Late 2011, Xcode 4.5.1 on OS X 10.7.5 and planing  to update to mavericks soon</p>
  
  <p>Thank.</p>