titanium

How do you create a raised tab bar item, like the one found in Instagram, with Titanium?

♀尐吖头ヾ 提交于 2020-01-01 06:51:08
问题 I am trying to create a menu like the one on Instragram, with the central item using a special design, but the Titanium Documentation does not provide information about this kind of feature There's an example with an already answered question in here: How do you create a raised tab bar item, like is found in Instagram? but I need it working on titanium, any clues? 回答1: I believe Instagram is written in Objective-C. Creating a custom tab bar as they have made involves subclassing the native

How do I tell if the app was opened or resumed as a result of a push notification in Titanium?

假如想象 提交于 2020-01-01 05:38:06
问题 How do you handle a push differently in Titanium depending on whether the app was open at the time the push arrived? When a push notification comes in and my app is running, I would like to pop up a message offering to take the user to the item the notification refers to. If the app is closed, and the user taps on the push notice and causes the app to open, I would like to take the user directly to the item without a popup. Titanium's registerForPushNotifications seems to only have one

iOS LocationManager is not updating location (Titanium Appcelerator module)

有些话、适合烂在心里 提交于 2019-12-31 05:45:12
问题 I've made Appcelerator Titanium Module for fetching device's rotaion and location. Source can be found on GitHub. The problem is that it fetches only one cached location but device motion data is OK and it is refreshing. I don't use delegate, I pull that data in my Titanium Javascript Code. If I set "City Run" in Simulator -> Debug -> Location nothing happens. The same cached location is returning. Pulling of location is OK because I tried with native app wich does this: textView.text =

Titanium - Retrieving SQLite Data from previous version of iOS App

雨燕双飞 提交于 2019-12-31 04:19:08
问题 I've been commissioned to update a native iOS app, but as we're also going to release it to other platforms, we're are writing the new version using Appcelerator's Titanium. The current app uses a SQLite database to store user information. How do I access the existing SQLite database when the user updates their app to the new one? We don't want to lose any data. I assumed I would be able to access the old database and then create a migration to a new database. And what is the best way to test

How to select multiple images from gallery in titanium?

﹥>﹥吖頭↗ 提交于 2019-12-30 10:16:24
问题 Here I have the code to select image from gallery, but how can I select multiple images from gallery? Ti.Media.openPhotoGallery({ // allowEditing:true, mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO], success : function(e) { alert(e); ImageView.image = e.media; //alert('height:'+e.media.height+'width:'+e.media.height); lblWidth.text = 'W :'+e.media.width; lblHeight.text ='H :' +e.media.height; }, cancel : function() { }, error : function(err) { } }); 回答1: Here I found the module for android Link for

Check if a file exists locally using JavaScript only

泄露秘密 提交于 2019-12-28 06:19:08
问题 I want to check if a file exists locally, where the HTML file is located. It has to be JavaScript. JavaScript will never be disabled. jQuery is not good but can do. By the way, I am making a titanium app for Mac so I am looking for a way of protecting my files from people who click "show package contents". 回答1: Your question is ambiguous, so there are multiple possible answers depending on what you're really trying to achieve. If you're developping as I'm guessing a desktop application using

How can I adjust the width of a pickerColumn to the text inside the pickerColumns?

我只是一个虾纸丫 提交于 2019-12-25 18:12:35
问题 So far I can only adjust the size of each PickerColumn manually through code, but I want each of them to adjust automatically according to the contents from the largest PickerRow inside of any of them. This is because I'm working with dynamic PickerColumns whose PickerRows content change according to the previous PickerColumn's selected value. I found out how to scale the whole Picker using the next code: var transformPicker=Ti.UI.create2DMatrix().scale(0.5); var picker = Ti.UI.createPicker({

How can I adjust the width of a pickerColumn to the text inside the pickerColumns?

夙愿已清 提交于 2019-12-25 18:12:11
问题 So far I can only adjust the size of each PickerColumn manually through code, but I want each of them to adjust automatically according to the contents from the largest PickerRow inside of any of them. This is because I'm working with dynamic PickerColumns whose PickerRows content change according to the previous PickerColumn's selected value. I found out how to scale the whole Picker using the next code: var transformPicker=Ti.UI.create2DMatrix().scale(0.5); var picker = Ti.UI.createPicker({

How to save or open a pdf file in pdf Viewer from response titanium

ⅰ亾dé卋堺 提交于 2019-12-25 09:43:02
问题 I want to open pdf file on click. I tried below code but it didn't help me. It is giving error could not read file var xhr = Ti.Network.createHTTPClient({ onload : function(e) { var f = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'file.pdf'); Ti.API.info('file == ' + f); Ti.API.info('response = ' + this.responseData); Ti.API.info('response = ' + JSON.stringify(this.responseData)); f.write(this.responseData); Ti.API.info('write file == ' + f.write(this.responseData)); Ti.API

How to bind the data in to label in Titanium alloy?

隐身守侯 提交于 2019-12-25 09:28:52
问题 How can I bind data from controller to xml, My code is as follows, View: <Collection src="respondentAge"/> <Label id="question"></Label> Styles ".question":{ font:{ fontSize:18, fontWeight:'normal' }, color:"#000", left:10, height:Ti.UI.SIZE } Controller var agenames = Alloy.Collections.respondentAge; agenames.on("reset", function() { var agenamesLength = agenames.length; var question; for (var i = 0; i < agenamesLength; i++) { question = agenames.at(i).get("quesion"); // I need to bind the