[TIMOB-24258] iOS: Titanium.UI.iOS.DocumentViewer height properties not working under Ti.UI.createTabGroup
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2016-12-23T14:46:09.000+0000 |
Affected Version/s | Release 6.0.1 |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Aminul Islam |
Assignee | Eric Merriman |
Created | 2016-12-23T11:04:20.000+0000 |
Updated | 2017-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();
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.Closing ticket as invalid.