2016-07-11 45 views
1

我使用tvml開發tvOS應用程序。tvOS中「更多」按鈕與文本截斷不起作用

由於描述文字較長,系統會按照more按鈕將長文本切成簡短描述。

但是,more按鈕不起作用。點擊按鈕後,它不會顯示任何內容,並且應該彈出一個屏幕,其中包含所有說明。

以下是代碼的一部分。如果你能幫助我,我真的很感激!

<document> 
    <head> 
    <style> 
    </style> 
    </head> 
    <compilationTemplate theme="dark"> 
    <list> 
     <relatedContent> 
     <itemBanner> 
      <heroImg src="${this.BASEURL}images/stackImage/stack01.png" width="650" height="650" /> 
     </itemBanner> 
     </relatedContent> 
     <header> 
     <title>This is a title</title> 
     <subtitle>Aware</subtitle> 
     <row> 
      <text>120 minutes</text> 
     </row> 
     </header> 
     <section> 
     <description allowsZooming="true">This is the long description!This is the long description!This is the long description!This is the long description!This is the long description!This is the long description! 
     </description> 
     </section> 
     <section> 
     <listItemLockup autoHighlight="true" videoURL="videoURL"> 
      <ordinal minLength="2">1</ordinal> 
      <title>This is the subject</title> 
      <decorationLabel>15:28</decorationLabel> 
     </listItemLockup> 
    </section> 
</list> 

回答

1

你需要實際的代碼,聽的更多按鈕點擊的部分,並在警報視圖呈現全文。該功能不會與描述組件自動匹配。 Check out this tutorial瞭解詳情。轉到名爲「處理文本溢出」的部分,您將看到如何做到這一點。