Possible error in documentation

614
1
12-29-2009 09:24 PM
deleted-user--c7HXKQt3eCH
New Contributor
This tutorial incorrectly states that to get the map to rotate all I need to do is include the following code in the view controller implementation file:

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

The above code snippet will keep the map in the portrait orientation and won't rotate the map when the device is moved to a landscape orientation. Instead of returning (interfaceOrientation == UIInterfaceOrientationPortrait) the method should return YES.
0 Kudos
1 Reply
DavidCardella
Esri Contributor
Hi,

Thanks for your comment on the error. You are indeed correct in that there is a typo in the shouldAutorotateToInterfaceOrientation method. The contents of the method should read:

return interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;

Note: the "!=" and not "==".

The same thing can be accomplished by returning YES.

Thanks again,
David
0 Kudos