Skip to content

Instantly share code, notes, and snippets.

@Seasons7
Seasons7 / HelloWorldLayer.m
Created September 28, 2012 07:23
CCTransitionZoomFlipXSample
//
// HelloWorldLayer.m
// aaaa
//
// Created by hatakeis on 2012/09/28.
// Copyright __MyCompanyName__ 2012年. All rights reserved.
//
// Import the interfaces
@Seasons7
Seasons7 / rate.m
Created April 14, 2012 05:01
call AppStore rating page.
// 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 {
@Seasons7
Seasons7 / app.js
Created October 30, 2011 13:27
Titanium Growl Animation
Titanium.UI.setBackgroundColor('#000');
var window = Ti.UI.createWindow({
title:'テスト',
backgroundColor:'#FFF'
});
var label = Ti.UI.createLabel({
bottom:0,
color:'#FFF',
@Seasons7
Seasons7 / shakeAnimation.js
Created September 24, 2011 10:05
Shake animation that like editing of home screen.
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({
@Seasons7
Seasons7 / app.js
Created August 30, 2011 07:54
OpenReeder
Titanium.UI.setBackgroundColor('#000');
var notification;
var fireDate = null;
var hasNotification = true;
var win = Titanium.UI.createWindow({
title:'OpenReeder',
backgroundColor:'#fff'
});
@Seasons7
Seasons7 / app.js
Created August 21, 2011 10:33
Titanium Play Sound.
Titanium.UI.setBackgroundColor('#000');
// ウィンドウ作成
var win = Titanium.UI.createWindow({
title:'サウンドテスト',
backgroundColor:'#fff',
barColor:'#3366ff'
});
var button = Ti.UI.createButton({
@Seasons7
Seasons7 / CCSendMessageTest.m
Created June 4, 2011 08:58
CCSendMessageSample
//
// HelloWorldLayer.m
// CCSendMessageTest
//
// Created by Keisuke Hata on 11/06/04.
//
// Import the interfaces
#import "HelloWorldLayer.h"
@Seasons7
Seasons7 / convert2caf.rb
Created May 26, 2011 12:13
Convert aif to caf
Dir.glob("*.aif").each do |fname|
%x{afconvert -f caff -d ima4 #{fname}}
end
@Seasons7
Seasons7 / CCLabelBMFont.h
Created April 5, 2011 17:40
CCLabelBMFont supported Unicode
/*
* cocos2d for iPhone: http://www.cocos2d-iphone.org
*
* Copyright (c) 2008-2010 Ricardo Quesada
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@Seasons7
Seasons7 / CCGaussianBlurSprite.h
Created January 29, 2011 15:19
CCGaussianBlurSprite.h
//
// CCGaussianBlurSprite.h
// AWTextureFilter
//
// Created by Keisuke Hata on 11/01/19.
//
#import <Foundation/Foundation.h>
#import "AWTextureFilter.h"
#import "CCTexture2DMutable.h"