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
function shakeAnimation(view) { | |
view.transform = Ti.UI.create2DMatrix().rotate(1); | |
var r1 = Ti.UI.create2DMatrix().rotate(2); | |
var r2 = Ti.UI.create2DMatrix().rotate(-2); | |
var anim1 = Ti.UI.createAnimation({ | |
duration:200, | |
transform:r1, | |
}); | |
var anim2 = Ti.UI.createAnimation({ |
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 window = Ti.UI.createWindow({ | |
title:'テスト', | |
backgroundColor:'#FFF' | |
}); | |
var label = Ti.UI.createLabel({ | |
bottom:0, | |
color:'#FFF', |
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
// jump to AppStore review page | |
- (void)rate:(int)appID { | |
NSString *url = [NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d",appID]; | |
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]]; | |
} | |
- (IBAction)rateNow:(id)sender { | |
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
// | |
// HelloWorldLayer.m | |
// aaaa | |
// | |
// Created by hatakeis on 2012/09/28. | |
// Copyright __MyCompanyName__ 2012年. All rights reserved. | |
// | |
// Import the interfaces |
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
//------------------------------------------------------------------ | |
// | |
// JavaScript sample | |
// | |
//------------------------------------------------------------------ | |
// | |
// For a more complete sample, see "JS Watermelon With Me" bundled with cocos2d-iphone | |
// |
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
var Seasons = function(){ | |
this.name = "keisuke hata"; | |
} | |
Seasons.prototype.sayHello = function() { | |
print("こんにちは!!"); | |
} |
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
<dict> | |
<key>name</key> | |
<string>Block Cursor</string> | |
<key>scope</key> | |
<string>block_cursor</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#FFFFFF</string> | |
<key>background</key> |
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
from mod_pbxproj import XcodeProject | |
if __name__ == '__main__': | |
proj = XcodeProject.Load('test01.xcodeproj/project.pbxproj') | |
test01 = proj.get_or_create_group("test01") | |
resources = proj.get_or_create_group("Resources", parent=test01) | |
proj.add_file("hoge/a.txt", parent=resources) | |
proj.backup() | |
proj.save() |
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
def add_resources(proj): | |
test01 = proj.get_or_create_group("test01") | |
resources = proj.get_or_create_group("Resources", parent=test01) | |
# res = proj.get_or_create_group("res", parent=resources) | |
proj.add_folder("test01/Resources/res", parent=resources) |
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
require("jsb.js"); | |
try { | |
director = cc.Director.getInstance(); | |
winSize = director.getWinSize(); | |
centerPos = cc.p( winSize.width/2, winSize.height/2 ); | |
var GameLayer = cc.Layer.extend({ |