Contents

조회 수 19357 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
<!DOCTYPE html>  
<html>  
<head>  
<title>Orientation Checker</title>  
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximumscale=1.0; user-scalable=0;" />  
<script type="text/javascript" src="/js/jquery-1.6.1.min.js"></script>   
<script type="text/javascript">  
/*  
 * ios, android 둘다 지원되는 스크립트   
 */   
var ori_status;   
  
$(document).ready(function() {    
    window.onorientationchange = changeOrientation;  
    window.setTimeout(changeOrientation, 0);          
});  
  
// event handler  
function changeOrientation(){  
    if(ori_status == detectOrientation())return;  
    ori_status = detectOrientation();         
    alert(ori_status);    
}  
  
function detectOrientation(){  
    var orientation = window.orientation;   
    var rtn;  
  
    switch(orientation) {    
        case 90: case -90:    
            rtn = 'landscape';    
            break;    
        default:    
            rtn = 'portrait';    
    }    
    return rtn;  
}  
</script>  
</head>  
<body>  
  
</body>  
</html>  

?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
289 Develop [ios] 코코아 프레임워크(Cocoa Framework) 기본적인 내용~ hooni 2013.04.23 27680
288 Develop [ios] 코코아 프로그래밍의 네이밍 룰(명명 규칙) hooni 2017.05.11 1175
287 Develop [ios] 테이블뷰셀/뷰에 배경 패턴 넣기.. hooni 2013.04.23 29813
286 Develop [ios] 패스(path) 앱 메뉴 스타일 secret hooni 2013.06.11 0
285 Develop [ios] 푸시알림(APNS)에 대한 php 라이브러리 ㅋㅋ hooni 2013.04.23 16630
284 Develop [ios] 한샘 카달로그 앱 소스 (아이폰용) secret hooni 2013.04.23 10922
283 Develop [ios][swift] 초간단 TableView 샘플 file hooni 2016.06.27 730
282 Develop [ios][swift] 초간단 To-do Memo file hooni 2016.06.27 1059
281 Develop [ios][swift] 초간단 카달로그 앱 (Catalog App) file hooni 2016.06.27 7081
280 Develop [io] Apple Watch, Today Extension 앱ID 설정 hooni 2016.04.20 788
279 Develop [iphone] PerfectlyClear 보정솔루션 최신.. secret hooni 2013.05.28 0
278 Develop [iphone] performSelector:withObject:afterDelay: 에 대한 내용 hooni 2013.04.23 65864
Board Pagination Prev 1 ... 42 43 44 45 46 47 48 49 50 51 ... 71 Next
/ 71