2014-11-18 1 views
0

지금은 Onsen UI와 Phonegap (Cordova)으로 iPhone 앱을 만들고 있습니다.Phonegap을 사용하여 Onsen UI에 <ons-tabbar>을로드하는 중 사전로드 이미지를 추가 하시겠습니까?

<ons-tabbar>에서 새 페이지를 열면 새 페이지가 나타나기 전에 화면에 약간의 플래시가 나타납니다.

새 페이지가 이전보다 부드럽게 보이기 전에로드하는 이미지를 추가하는 방법을 알고 있거나 다른 모양을 더 잘 보이게 만드는 방법을 아는 사람이 있습니까?

이 내 코드의 일부는 다음과 같습니다

<ons-tabbar class="tab-wrapper"> 
     <ons-tab class="first-footer-button" page="feeds-index.html" active="true"> 
     <!-- <ons-icon icon="ion-home"></ons-icon> --> 
     <img src="img/icon/feeds_icon.png" alt=""> 
     <span>Feeds</span> 
     </ons-tab> 
     <ons-tab page="recents-index.html"> 
     <!-- <ons-icon icon="ion-star"></ons-icon> --> 
     <img src="img/icon/recents_icon.png" alt=""> 
     <span>Recents</span> 
     </ons-tab> 
     <ons-tab page="settings.html"> 
     <!-- <ons-icon icon="ion-gear-a"></ons-icon> --> 
     <img src="img/icon/profile_icon.png" alt=""> 
     <span>Profile</span> 
     </ons-tab> 
     <ons-tab page="settings.html"> 
     <!-- <ons-icon icon="ion-gear-a"></ons-icon> --> 
     <img src="img/icon/history_icon.png" alt=""> 
     <span>History</span> 
     </ons-tab> 
     <ons-tab page="settings.html"> 
     <!-- <ons-icon icon="ion-gear-a"></ons-icon> --> 
     <img src="img/icon/setting_icon.png" alt=""> 
     <span>Setting</span> 
     </ons-tab> 
</ons-tabbar> 

답변

0

ons-loading-placeholder 속성은 온천 UI 1.2.0에서 추가되었습니다. 다음과 같이

그것은 사용할 수 있습니다 :

<div ons-loading-placeholder="page.html"> 
    Loading... 
</div> 

당신은 <div> 내부에 약간의 애니메이션을 넣을 수 있습니다.

+0

나는 그것을 시도했지만 작동하지 않았다. 아마 잘못된 부분에 넣었을 것이다. 그래서이 요소를 어디에 넣어야합니까? 정말 고마워요! –