iphone - Orientation after if statement -
i have code calls method (one un comment out use)
// override allow orientations other default portrait orientation. - (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation { // return yes supported orientations nslog(@"so orientation %d", orientationinteger); //1 button left, 0 right. if (orientationinteger == 1) { return uiinterfaceorientationlandscapeleft; nslog(@"setting orientation landscape left"); } if (orientationinteger == 0) { return uiinterfaceorientationlandscaperight; nslog(@"setting orientation landscape right"); } else { return (interfaceorientation == uiinterfaceorientationlandscaperight); nslog(@"no instructions regarding orientation."); } }
however, orientation not change, nor log messages after first fire.
nslog(@"so orientation %d", orientationinteger);
gives 'so orientation 1' or 'so orientation 2' sometimes. ideas?
the method exits whenever runs return
statement. log messages after return
statements never displayed.
i don't know why actual functionality isn't working; might problem somewhere else in code.
Comments
Post a Comment