This file contains 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
0 CoreFoundation 0x0234457c __exceptionPreprocess + 156 | |
1 libobjc.A.dylib 0x02498313 objc_exception_throw + 44 | |
2 CoreFoundation 0x0233a1bc -[__NSArrayI objectAtIndex:] + 236 | |
3 MyApp 0x0010719b -[InnerScrollView viewForZoomingInScrollView:] + 66 | |
4 UIKit 0x008c75a0 -[UIScrollView _getDelegateZoomView] + 117 | |
5 UIKit 0x008c9d75 -[UIScrollView _centerContentIfNecessary] + 36 | |
6 UIKit 0x008c8aea -[UIScrollView layoutSubviews] + 72 | |
7 QuartzCore 0x019e8c6a -[CALayer layoutSublayers] + 181 | |
8 QuartzCore 0x019eafec CALayerLayoutIfNeeded + 220 | |
9 QuartzCore 0x01990400 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310 |
This file contains 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 -*- | |
# | |
# Make an iOS project transportable so that it can be zipped and | |
# sent to another machine | |
# | |
import os, sys, shutil, codecs, glob | |
template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) |
This file contains 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
// Before proceeding, you must create sqlite database "test.db" in Resources directory. | |
Ti.Database.install('test.db', 'tests'), | |
function insert(data){ | |
var sql = "INSERT INTO samples (id, title, sample) VALUES (?, ?, ?)"; | |
try{ | |
this.db.execute(sql, data.id, data.title, data.sample); | |
}catch(e){ | |
Ti.API.info('insert error:' + sql); | |
} |
This file contains 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
//////////////////////push_notifications.js/////////////////////// | |
var apns = function(){ | |
var pref = require('preferences').preferences; | |
Titanium.Network.registerForPushNotifications({ | |
types: [ | |
Titanium.Network.NOTIFICATION_TYPE_BADGE, | |
Titanium.Network.NOTIFICATION_TYPE_ALERT | |
], | |
success:function(e) |
This file contains 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
//app.js | |
(function() { | |
var person, syrup; | |
syrup = require('syrup'); | |
syrup.include('/model/entity'); | |
syrup.include('/model/person'); | |
person = new MYAPP.Model.Person('Coffee syrup'); | |
person.sayHello(); | |
}).call(this); |
This file contains 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
save_button.addEventListener('click', ()-> | |
if Ti.Filesystem.isExternalStoragePresent | |
save_image = Ti.Filesystem.getFile(path).read() | |
new_path = Titanium.Filesystem.externalStorageDirectory + Date.now().toString() + ".png" | |
f = Ti.Filesystem.getFile(new_path) | |
result = f.write(save_image) | |
unless result | |
return null |
This file contains 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
Titanium.UI.setBackgroundColor('#000'); | |
var tabGroup = Titanium.UI.createTabGroup(); | |
var win1 = Titanium.UI.createWindow({ | |
title:'Tab 1', | |
backgroundColor:'#fff' | |
}); | |
var tab1 = Titanium.UI.createTab({ | |
icon:'KS_nav_views.png', | |
title:'Tab 1', | |
window:win1 |
This file contains 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
// Global Background Color | |
Ti.UI.setBackgroundColor("#000000"); | |
// Namespace | |
var APP = {}; | |
// Running | |
(function () { | |
// Window | |
var win = Ti.UI.createWindow({ |
This file contains 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
# モデルがこれだけで作れたら素敵じゃないか | |
# entry.coffee | |
Database = require('libs/database') | |
class Entry extends Database | |
initialize:()-> | |
@property 'title', 'text' | |
@property 'body', 'text' | |
super | |
module.exports = new Entry('entries') |
This file contains 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
win.addEventListener('android:back', ()-> | |
intent = Ti.Android.createIntent | |
action: Ti.Android.ACTION_MAIN | |
intent.addCategory Ti.Android.CATEGORY_HOME | |
Ti.Android.currentActivity.startActivity intent | |
return | |
) |
OlderNewer