echo json_encode("中文", JSON_UNESCAPED_UNICODE);
http://www.laruence.com/2011/10/10/2239.html
2011/10/30
PHP Class Autoload,自動加載類別
class Loader
{
public static function loadClass($class)
{
$file = $class . '.php';
if (is_file($file)) {
require_once($file);
}
}
}
spl_autoload_register(array('Loader', 'loadClass'));
2011/10/29
CGAffineTransform
CGAffineTransform 仿射轉移
1宣告陣列
2套用要轉換的參數
1宣告陣列
2套用要轉換的參數
CGAffineTransform tf=CGAffineTransformIdentity;
tf=CGAffineTransformTranslate(tf, img_x,img_y);//平移
tf=CGAffineTransformRotate(tf, radian);//旋轉
tf=CGAffineTransformScale(tf, 1.0f, 1.0f);//縮放
[imageView setTransform:tf];//將view套用整個轉移
[imageView setNeedsDisplay];//重畫畫面
訂閱:
文章 (Atom)