Hi All,
i am developing an ios application using titanium, in that i am showing files like(.pdf,.txt,.doc,.docs) i want to read when these files when click event is performed on those files.
Here is my code in that i am using Titanium.UI.iOS.DocumentViewer, when i clicking on file it will opens another window with file name and showing file name and file type, but data of that file is not displaying, how to read the data of file please help me
below is my code.
var navButton = Titanium.UI.createButton({title:'Launch'}); $.annoucementWin.RightNavButton = navButton; var winButton = Titanium.UI.createButton({ title:'Launch', height:40, width:200, top:270 }); $.annoucementWin.add(winButton); var docViewer = Ti.UI.iOS.createDocumentViewer({url : test.pdf }); navButton.addEventListener('click', function(){ docViewer.show({view:navButton, animated: true}); }); // The document viewer immediately launches without an animation winButton.addEventListener('click', function(){ docViewer.show(); });