2016-12-02 5 views
3

PhoneGapiOSiOS9+ 용으로 작성하는 데 사용 중입니다. 가이드 라인에 따라 Config.xml에 다음 코드를 추가하여 스플래시 화면을 설정했습니다. PhoneGap에서 iOS 용 시작 화면을 설정하는 방법

// set the cordova plugin 
<plugin name="cordova-plugin-splashscreen" source="npm" spec="&gt;1.0.0" /> 

// set splash screen for iPad only 
<platform name="ios"> 
    <gap:splash gap:platform="ios" height="2048" src="res/screen/ios/[email protected]~ipad.png" width="1536" /> 
    <gap:splash gap:platform="ios" height="2048" src="res/screen/ios/[email protected]~ipad.png" width="1536" /> 
    <gap:splash gap:platform="ios" height="768" src="res/screen/ios/Default-Landscape~ipad.png" width="1024" /> 
    <gap:splash gap:platform="ios" height="1536" src="res/screen/ios/[email protected]~ipad.png" width="2048" /> 
</platform> 

은 그 때 나는 iOS 플랫폼에서 아이폰 OS 플랫폼을

phonegap build ios --device 

그것은 모두 복사 스플래시 이미지를 생성하는 '터미널'에서 다음 명령을 사용했다.

그러나 앱을 실행하면 기본값 Phonegap 스플래시 화면 이미지가 표시됩니다. iOS 프로젝트 'Images.xcassets'-> 'LaunchImage을 체크인했는데 기본 이미지가 PhoneGap 개로 표시됩니다. Config.xml 파일에서 언급 한 스플래시 이미지가 표시되지 않습니다. iOSconfig.xml을 사용하여 스플래시 이미지를 설정하려면 어떻게해야합니까?

+0

쇼 전화 격차의 이미지를 포함하거나'$ cordovaSplashscreen' – young

+0

확인을 ngCordova이 플러그인이 너무 HTTPS를이 http://ngcordova.com/docs/plugins/splashscreen/ – young

+0

검사를 사용하여 시작 화면을 숨길 수 : // cordova.apache.org/docs/ko/latest/reference/cordova-plugin-splashscreen/ – young

답변

4

먼저

cordova plugin add cordova-plugin-splashscreen 

그런 다음 Config.xml의이 라인을 추가 시작 화면을 플러그인을 추가 할 수 있습니다.

<!-- iOS splash screen --> 
<!-- iPad --> 
<splash src="www/res/screen/ios/Default-Portrait.png" platform="ios" width="768" height="1024" /> 
<splash src="www/res/screen/ios/Default-Landscape.png" platform="ios" width="1024" height="768" /> 
<!-- Retina iPad --> 
<splash src="www/res/screen/ios/[email protected]" platform="ios" width="1536" height="2048" /> 
<splash src="www/res/screen/ios/[email protected]" platform="ios" width="2048" height="1536" /> 

<!-- Default splash screen --> 
<splash src="splash.png" /> 

그것이 Config.xml의 정의한 바와 폭과 높이가 동일해야 화상의 확인.

또는 시도하십시오 기본 스플래시 화면.

config.xml이있는 전체 크기의 시작 화면 이미지를 유지하면 모든 플랫폼에서 splash.png 파일이 복사되므로 권장되지 않습니다. 이렇게하면 앱 크기가 증가하지만 작동하는지 확인할 수 있습니다.

건배.

+0

이미 'cordova-plugin-splashscreen'플러그인을 프로젝트에 설치했습니다. 또한 이미지 크기를 교차 검사 했으므로 예상대로 정확합니다. 여전히 기본 phonegap 스플래시 화면 이미지를 보여줍니다 – Rohit

+0

내가 정확히 config.xml에 작성한 다음 그것을 시도 라인을 작성하십시오. –

+0

iPad 용 응용 프로그램 만 개발 중입니다. iPad 용 세부 정보를 제공해 주시겠습니까? – Rohit

0

스플래시 화면 디렉토리 (www/res/screen/ios /)에서 이미지 파일을 변경/교체해야합니다. 기본적으로 이

관련 문제