screen-orientation.ios.js
function setCurrentOrientation(orientationType,callback){

    if("landscape"==orientationType.toLowerCase()){
        UIDevice.currentDevice.setValueForKey(UIInterfaceOrientationLandscapeLeft,"orientation");
        setShouldAutoRotate(false);
    }
    else if("portrait"==orientationType.toLowerCase()){
        UIDevice.currentDevice.setValueForKey(UIInterfaceOrientationPortrait,"orientation");
        setShouldAutoRotate(false);

    }else if("all" == orientationType.toLowerCase()){
        setShouldAutoRotate(true);
    }
    if(undefined!==callback){
        callback();
    }

}
function setCurrentOrientation(orientationType,callback){

    if("landscape"==orientationType.toLowerCase()){
        UIDevice.currentDevice.setValueForKey(UIInterfaceOrientationLandscapeLeft,"orientation");
        setShouldAutoRotate(false);
    }
    else if("portrait"==orientationType.toLowerCase()){
        UIDevice.currentDevice.setValueForKey(UIInterfaceOrientationPortrait,"orientation");
        setShouldAutoRotate(false);

    }else if("all" == orientationType.toLowerCase()){
        setShouldAutoRotate(true);
    }
    if(undefined!==callback){
        callback();
    }

}
function setCurrentOrientation ( orientationType , callback ) { if ( "landscape" == orientationType . toLowerCase ( ) ) { UIDevice . currentDevice . setValueForKey ( UIInterfaceOrientationLandscapeLeft , "orientation" ) ; setShouldAutoRotate ( false ) ; } else if ( "portrait" == orientationType . toLowerCase ( ) ) { UIDevice . currentDevice . setValueForKey ( UIInterfaceOrientationPortrait , "orientation" ) ; setShouldAutoRotate ( false ) ; } else if ( "all" == orientationType . toLowerCase ( ) ) { setShouldAutoRotate ( true ) ; } if ( undefined !== callback ) { callback ( ) ; } }
set current orientation and call the callback once the orientation is set
@param orientationType
@param callback
set current orientation and call the callback once the orientation is set