1.1.0 • Published 6 years ago

danbi-plugin-splashscreen v1.1.0

Weekly downloads
8
License
Apache 2.0
Repository
github
Last release
6 years ago

wink-plugin-splashscreen

윙크 서비스용 스플래쉬 스크린 플러그인

Installation

cordova plugin add https://github.com/DanbiEduCorp/wink-plugin-splashscreen.git --save

웹 페이지 지정

  1. splash screeen 으로 사용할 웹페이지를 www 폴더안에 넣는다. ( css / js 따로 넣어도 된다. )
  2. config.xml ( plugin.xml 이 아닙니다. ) 에 다음과 같이 splash screen 으로 사용할 페이지를 지정한다. path는 www 아래의 path를 사용한다. example :

Example 로딩후 hide 하기.

 // index.js onDeviceReady 의 사용예, 디버그를 위해서 1초있다가 hide
 onDeviceReady: function() {
        this.receivedEvent('deviceready');

        var myVar = setInterval(myTimer, 1000);
        function myTimer() {
            navigator.splashscreen.hide();
        }
    },

android 의 경우

android 는 비교적 launch 시간이 빠르기 때문에, web page 를 splash screen 으로 webpage 를 이용해서 크게 문제가 없어 보입니다.

iOS 의 경우

iOS 는 launch image 와 splash screen 으로 나뉘는데, launch image 는 static 한 image 한장이고, 제어할수 없다. iOS LifeCycle 을 보면, didfinishlaunching( withoptions ) 가 호출되기 전에는 view 가 사용할 준비가 되기 전이기 때문에, launching image 를 이용해서 어떠한 작업도 할 수 없다. 그렇기 때문에, launching image 와 splash screen 에 비슷한 이미지를 배치해서 연속성이 있도록 하거나, launching image 에 단순한 회사 로고를 사용하는 정도로 수정하는 수 밖에 없다. launching image 의 세팅은 아래의 페이지를 참고한다. https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/index.html