Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24258] iOS: Titanium.UI.iOS.DocumentViewer height properties not working under Ti.UI.createTabGroup

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2016-12-23T14:46:09.000+0000
Affected Version/sRelease 6.0.1
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterAminul Islam
AssigneeEric Merriman
Created2016-12-23T11:04:20.000+0000
Updated2017-03-20T21:48:57.000+0000

Description

http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.DocumentViewer-property-height 1.Create a test project. 2.Add Titanium.UI.iOS.DocumentViewer under Ti.UI.createTabGroup 3. Set Titanium.UI.iOS.DocumentViewer height : '50%' 4. Bulid it on iOS 5. DocumentViewer open pdf on full windowds.
var tabGroup = Ti.UI.createTabGroup();

var win1 = Ti.UI.createWindow({

title : 'one',

backgroundColor : '#fff'

});

var tab1 = Ti.UI.createTab({

title : 'one',

window : win1

});

var win2 = Ti.UI.createWindow({

title : 'two',

backgroundColor : '#fff',

});

var docViewer = Ti.UI.iOS.createDocumentViewer({

url : 'BIO DATA.pdf',

height : '50%',

width :  '50%'

});

win2.add(docViewer);

var tab2 = Ti.UI.createTab({

title : 'two',

window : win2

});

tab2.addEventListener('selected', function(e) {

docViewer.show({animated : true});

});

tabGroup.addTab(tab1);

tabGroup.addTab(tab2);

tabGroup.open();

Comments

  1. Hans Knöchel 2016-12-23

    The document viewer should be open modally using the show properly. Adding it as a child view is not recommended. If done anyway, use a wrapper view to control the height.
  2. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source