Ionic ios应用程序在标题下方显示黑条

时间:2015-09-16 05:14:04

标签: android ios cross-platform ionic

我是ionic移动应用开发的新手。我正在开发一款移动应用,其中Android应用可以正常运行,但在IOS上,它会在标题下方显示黑条。

IOS:

with black bar

Android:

Work Perfect

屏幕截图屏幕:

<ion-content class="padding">
<div class="list">

    <a class="item item-icon-left" ui-sref="appBody.dashboard"> <i
        class="icon fa fa-tachometer"></i> Dashboard
    </a> <a class="item item-icon-left" href="#"> <i
        class="icon fa fa-lightbulb-o"></i> Opportunity
    </a> <a class="item item-icon-left" ui-sref="appBody.person"> <i
        class="icon fa fa-user"></i> Person <!--   <span class="item-note">
      Grammy
    </span> -->
    </a> <a class="item item-icon-left" ui-sref="appBody.scheduler"> <i
        class="icon fa fa-calendar"></i> Calendar <!-- <span class="badge badge-assertive">0</span> -->
    </a> <a class="item item-icon-left" ui-sref="appBody.product"> <i
        class="icon fa fa-cube"></i> Products
    </a> <a class="item item-icon-left" href="#"> <i
        class="icon fa fa-weixin"></i> Interactions
    </a> <a class="item item-icon-left" ui-sref="appBody.organization"> <i
        class="icon fa fa-building-o"></i> Organizations
    </a>
    <a class="item item-icon-left" ui-sref="appBody.priceBook"> <i
        class="icon ion-ios-book"></i> Price Book
    </a>
     <a class="item item-icon-left" ui-sref="appBody.visitplan"> <i
        class="icon fa fa-map-marker"></i> Visits
    </a>
     <a class="item item-icon-left" href="#"> <i
        class="icon ion-clipboard"></i> Place Order
    </a>
     <a class="item item-icon-left" ui-sref="appBody.competitors"> <i
        class="icon ion-ios-people"></i> DF SD
    </a>
     <a class="item item-icon-left" ui-sref="appBody.tax"> <i
        class="icon ion-ios-calculator"></i> DSAF SSF
    </a>
    <a class="item item-icon-left" ui-sref="appBody.serviceRequest"> <i
        class="icon ion-android-cart"></i> FADSF SDFIAF
    </a>
    <a class="item item-icon-left" ui-sref="appBody.baAttandance"> <i
        class="icon ion-android-checkbox-outline"></i> NFASDFJAGDS
    </a>
     <a class="item item-icon-left" ui-sref="appBody.uiTheme"> <i
        class="icon ion-gear-a"></i> ABCDEFF
    </a>

</div>
    <br><br><br>
</ion-content>

主屏幕代码:

<ion-header-bar align-title="center" class={{headerThemeName}}>
<a class="button fa fa-th" style="font-size: 18px"
    ui-sref="appBody.menu"></a> <!-- <i class="fa fa-th"></i> -->
<h1 class="title">{{Title}}</h1>
<div class="buttons">
    <button class="button fa fa-search" style="font-size: 18px;"
        ui-sref="appBody.search"></button> 
    <button class="button ion-plus"
        style="font-size: 18px; margin-left: 3%" ng-click="addNew()" ng-show="addNewHS"></button>
</div>
</ion-header-bar>
<div style="padding-bottom: 15px">
<ion-spinner icon="spiral"  ng-show="hasPendingRequests()"></ion-spinner>
    <ion-nav-view class="padding has-header has-footer"
        overflow-scroll="true"></ion-nav-view>

</div>

任何帮助都会受到赞赏。感谢。

1 个答案:

答案 0 :(得分:1)

通过将<ion-view>添加到a​​pp结构来解决此问题:

<ion-view>
    <!-- optional subheader for that view -->
    <ion-header-bar class="bar-subheader"></ion-header-bar>

    <ion-content>
        Content for the view
    </ion-content>

    <!-- optional footer for that view -->
    <ion-footer-bar></ion-footer-bar>
</ion-view>