Note that there are some explanatory texts on larger screens.

plurals
  1. POObjective C: Route-Me code behaves differently in iPad simulator 4.2 and 5
    primarykey
    data
    text
    <p>I'm trying to figure something that is going on with my Route-Me code using both the Xcode iPad 4.2 Simulator and the iPad 5 simulator and both simulators and giving different results. Here is a snippit of the code:</p> <pre><code> //set size of the map view [self setMapView:[[[RMMapView alloc] initWithFrame:CGRectMake(0.0, 0.0, 1024, 768)] autorelease]]; [mapView setBackgroundColor:[UIColor blackColor]]; self.view = mapView; //set locked on default location of view, currently on conus CLLocationCoordinate2D newLocation; newLocation.latitude = 37.83; newLocation.longitude = -96.58; [[mapView contents] moveToLatLong:newLocation]; [[mapView contents] setZoom:4.5]; </code></pre> <p>Then below I set the application to only use Landscape mode:</p> <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) { return YES; } return NO; } </code></pre> <p>I run this code in Xcode's iPad Simulator 4.2 and I get this image below which looks perfect: <img src="https://i.stack.imgur.com/UkAsR.png" alt="looks good here"></p> <p>Then I run this same code on Xcode's iPad Simulator 5 and I get this weird image: <img src="https://i.stack.imgur.com/15HRy.png" alt="This is weird"></p> <p>I'm confused aren't they supposed to yield the same results? or am I missing something here?</p> <p>EDIT: I have set Initial interface orientation and supported interface orientations in my plist file to have landscape only. </p> <p>EDIT2: I tried running it with the code below as is and it seemed to work but if you put the setZoom line into the code, the picture gets cut off again, see screenshot:</p> <pre><code>[self setMapView:[[RMMapView alloc] initWithFrame:CGRectMake(0.0, 0.0, 1024, 768)]]; [mapView setBackgroundColor:[UIColor grayColor]]; self.view = mapView; </code></pre> <p><img src="https://i.stack.imgur.com/NNOaz.png" alt="enter image description here"></p> <p>This is getting really strange, once I add the line [mapView.contents setZoom:4.5]; it happens again with the missing right portion of the screen.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload