Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14586] iOS7: Support textStyles introduced in iOS7

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-09-30T16:40:19.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 20, 2013 Sprint 20 API, Release 3.2.0
ComponentsiOS
Labelsios7, module_label, planning-3.2.0, qe-testadded
ReporterIngo Muschenetz
AssigneeVishal Duggal
Created2013-07-17T19:33:23.000+0000
Updated2015-06-12T15:55:15.000+0000

Description

Text Kit is a full-featured, high-level framework for apps that need to handle text that has all the characteristics of fine typography. This ticket is for supporting just the "dynamic type" aspect, some of which is discussed ehre: http://typographica.org/on-typography/beyond-helvetica-the-real-story-behind-fonts-in-ios-7/

Comments

  1. Vishal Duggal 2013-09-25

    Test Case
       function isiOS7Plus()
       {
           // add iphone specific tests
           if (Titanium.Platform.name == 'iPhone OS')
           {
               var version = Titanium.Platform.version.split(".");
               var major = parseInt(version[0],10);
               
               // can only test this support on a 3.2+ device
               if (major >= 7)
               {
                   return true;
               }
           }
           return false;
       
       }
       
       
       var win1 = Ti.UI.createWindow({
           backgroundColor:'white',
           layout:'vertical'
       });
        
       function makeLabel(labelText, labelFont) 
       {
           return Titanium.UI.createLabel({
           top: 20,
           text:labelText,
           font:labelFont,
           width:'auto',
           height:'auto'
           });
       }
         
       if (isiOS7Plus()) 
       {
           win1.add(makeLabel('Text Style Headline', {textStyle:Ti.UI.TEXT_STYLE_HEADLINE}));
           win1.add(makeLabel('Text Style SubHeadLine', {textStyle:Ti.UI.TEXT_STYLE_SUBHEADLINE}));
           win1.add(makeLabel('Text Style Body', {textStyle:Ti.UI.TEXT_STYLE_BODY}));
           win1.add(makeLabel('Text Style Footnote', {textStyle:Ti.UI.TEXT_STYLE_FOOTNOTE}));
           win1.add(makeLabel('Text Style Caption 1', {textStyle:Ti.UI.TEXT_STYLE_CAPTION1}));
           win1.add(makeLabel('Text Style Caption 2', {textStyle:Ti.UI.TEXT_STYLE_CAPTION2}));
       } 
       else 
       {
           win1.add(makeLabel('TextStyle is only suppported on iOS 7 and above', {fontWeight:'bold', fontSize:20}));
       }
        
       win1.open();
       
  2. Vishal Duggal 2013-09-25

    Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4736
  3. Paras Mishra 2013-10-10

    Verified fixed on: Device : iPhone 5 , iOS version : 7.0 SDK: 3.2.0.v20131008154043 CLI version : 3.2.0 OS : MAC OSX 10.8.4 Alloy : 1.2.2 Appcelerator Studio, build: 3.2.0.201310092427 XCode : 5

JSON Source