titanium

Convert UTC Date to datetime string Titanium

六眼飞鱼酱① 提交于 2019-12-05 20:33:59
I have a date string "2012-11-14T06:57:36+0000" that I want to convert to the following format "Nov 14 2012 12:27" . I have tried a lot of solutions including Convert UTC Date to datetime string Javascript . But nothing could help me. The following code worked for me in android. But for ios it displays as invalid date var date = "2012-11-14T06:57:36+0000"; //Calling the function date = FormatDate(date); //Function to format the date function FormatDate(date) { var newDate = new Date(date); newDate = newDate.toString("MMMM"); return (newDate.substring(4,21)); } Can anyone help me? Thanks in

Titanium UI之 Scrolling Views组件

为君一笑 提交于 2019-12-05 19:56:37
ScrollView及ScrollableView Objective TI 中 有两种滚动视图组件,ScrollView 和 ScrollableView,尽管名称大致相同,但是使用方法和属性都是很大的不同。 Contents ScrollView vs. ScrollableView 上面两幅图显示: ScrollView 是当内容太多时,出现的滚动条类组件,你可以拖拽滚动条来查看内容。 ScrollableView 是一个包含多个子Views的组件,跟web上面的焦点图比较类似,他只有横向滚动。 ScrollView 你可以像下面一样创建一个ScrollView var sv = Ti.UI.createScrollView({ height:200,//ScrollView的高度 width:200,//其宽度 /* left & right work too */ contentHeight:'auto', contentWidth:'auto' }) ScrollView properties 一些属性:(具体参见API) Property Description zoomScale, minZoomScale, maxZoomScale You can control zooming of the content within the ScrollView with

Titanium Appcelerator: iPhone Development without a Mac (like PhoneGap)

馋奶兔 提交于 2019-12-05 19:25:47
I am about to embark on some mobile development projects but I'm doing a little homework first. My primary goal is to deploy to Android and iOS, but the latter is posing some problems because I do not have access to (nor do I have any interested in acquiring) a Mac. Phonegap offers a cloud service where you can upload your mobile development project and they will do the building for you - no Mac required. From the Phonegap Build FAQ: Simply upload your web assets - a ZIP file of HTML, CSS and JavaScript, or a single index.html file - to PhoneGap Build, point us to your Git or SVN repository,

How do I draw a line in Titanium?

你。 提交于 2019-12-05 14:55:17
How Do I draw a line in Titanium that works in both Android and iPhone? you could create webview and use the <canvas> tag to draw in the web view Mayor Brain To create a line, I use; var view = Ti.UI.createView({ height:180, width:300 }); var line = Ti.UI.createView({ height:2, bottom:0, left:0, right:0, borderWidth:1, borderColor:'#aaa' }); view.add(line); Ash Prasad Add this to your view.xml <View class="line"></View> Add this to your style.tss ".line": { height: '2dp', bottom: '2dp', left: '0dp', right: '0dp', borderWidth: '1', borderColor:'#aaa', } 来源: https://stackoverflow.com/questions

Add overlay over top of ZBar scanner

给你一囗甜甜゛ 提交于 2019-12-05 12:13:06
I'm using the ZBar SDK to read QR codes on iPhone, however I want to add some text to the bottom of the camera/scanner view that is instructional text for the user. Here is what I have so far: UIView *cameraOverlayView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; cameraOverlayView.backgroundColor = [UIColor redColor]; UILabel *instructionLabel = [[UILabel alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; [instructionLabel setTextColor:[UIColor grayColor]]; [instructionLabel setBackgroundColor:[UIColor clearColor]]; [instructionLabel setFont:[UIFont

Titanium Creating Image file: file.write(blob) not creating the correct file

天大地大妈咪最大 提交于 2019-12-05 10:31:17
I am trying to read a .PNG file using Titanium 1.8.1 Here is my code to read file. var f = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'KS_nav_views.png'); var blob = f.read(); When I create a new file using the above blob object, the new file thus created is not same as the original file. Here is my code to create the new file. var outputDir = Titanium.Filesystem.getFile(Titanium.Filesystem.externalStorageDirectory,'output'); outputDir.createDirectory(); var newFile = Titanium.Filesystem.getFile(outputDir.nativePath,'outFile.png'); var test = newFile.write(blob); if ( test ===

SVG in Titanium Desktop?

岁酱吖の 提交于 2019-12-05 08:29:32
I'm running the 1.1.0 SDK of Titanium Desktop and only my SVG text elements are rendered properly. SVG methods such as getBBox() give error messages. The application works well outside the Titanium environment - that is: Chrome, Firefox, Safari. Any ideas on how to solve this? (What browser + version is really running inside Titanium??) Thanks. Edit: Example SVG code: <svg width="400" height="400" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg" version="1.1"> <title>Example triangle01- simple example of a 'path'</title> <desc>A path that draws a triangle</desc> <rect x="1" y="1" width

implement signalR without jquery

血红的双手。 提交于 2019-12-05 08:22:55
is it possible to implement SignalR without the use of Jquery. I want to create a module for Titanium, but I don't know how dependent SignalR is on the DOM. Is jQuery used just for the ajax request? how hard do you think this would be? Um its not impossible but it'll be abit of work. you will basicly need to re-write all jquery syntax ($...) in Jquery.signalR.js as regual javascript. Also you will only be able to do low level connections as the "hub" model also requires jquery. You will probably need to include JSON.js so you can make your ajax call like this. var the_object = {}; var http

Titanium api.info never shows anything in the console

微笑、不失礼 提交于 2019-12-05 04:17:15
I've just started with titanium and I can't make the Ti.API.info("My log message") to print anything in the console. I tried running the app in my Android device, in the Android Emulator, in the iPhone simulator and as a mobile web project in GoogleChrome, and the console window in Titanium Studio never prints my log message. My last attempt was in the imported sample "Todo List". On the beginning of the file app.js I've added two log messages: if (Ti.version < 1.8 ) { alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later'); } else { Ti.API.error('my error'); Ti

Titanium for iOS Development on Windows Platform

心已入冬 提交于 2019-12-05 03:46:15
I have downloaded Titanium for Windows platform. After installing correctly... I found that it needs iOS SDK.. So from where should i get iOS SDK. Is Development of iOS possible in Windows platform..?? What are the steps for making my Hello World Example to run in Titanium on Windows platform for iOS. I have refered some of the previous post like: Windows 7 Development Platform or iOS and Android development on Windows But still not able to get exact steps for making my example to run...?? No its not possible. You need to install Titanium on MAC then you will be able to develop applications