This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// make the contents of the window nav bar translucent like the iPhone app | |
var win = Titanium.UI.createWindow({barColor:"transparent",translucent:true}); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Titanium | |
{ | |
package UI | |
{ | |
public class Window extends View | |
{ | |
public native function open ( params : Object = undefined ) : void; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import Titanium.API; | |
import Titanium.UI; | |
/** | |
* Simple Titanium application written in ActionScript 3 | |
*/ | |
public class App | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Check the prerequisites for iPhone development | |
# | |
import os, sys, subprocess, re, types | |
import json, run, tempfile, codecs | |
template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple demo for adding swipe detection on a table view row. Since the row is simply a container | |
* of views, you'll want to generally create a hidden view the size of the row and add your swipe listener | |
* to this view for detection. We need to improve Titanium so you don't have to do this in the future... | |
*/ | |
var win = Ti.UI.createWindow(); | |
var data = []; | |
for (var c=0;c<10;c++) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var message = String.format(L("format_test"),"Jeff"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert(L("welcome")); | |
alert(Ti.Locale.getString("welcome")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<resources> | |
<string name="welcome">¡Hola</string> | |
<string name="format_test">Mi nombre es %s</string> | |
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<resources> | |
<string name="welcome">Hello</string> | |
<string name="format_test">My name is %s</string> | |
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Tail an application log file running in the iPhone Simulator | |
# | |
import os, sys, subprocess, time, signal, run, filetail | |
def find_file(folder, fname): | |
for root, dirs, files in os.walk(folder): |