2010年11月22日
摘要: 最普通动画://开始动画[UIView beginAnimations:nil context:nil]; //设定动画持续时间[UIView setAnimationDuration:2];//动画的内容frame.origin.x += 150;[img setFrame:frame];//动画结束[UIView commitAnimations];连续动画:一个接一个地显示一系列的图像NSA... 阅读全文
posted @ 2010-11-22 18:17 Sure-G 阅读(1628) 评论(0) 推荐(0) 编辑
摘要: srand(time(0));rand() % n;添加:有时候我们需要在程序中生成随机数。 但是Objective-C并没有提供相关函数,好在C提供了rand(), srand(), random(), srandom(), arc4random()几个函数// Get random number between 0 and 500intx = arc4random()% 500;// Get random number between 500 and 1000inty = (arc4random()%501)+500);arc4random()的好处是不用seed 阅读全文
posted @ 2010-11-22 17:54 Sure-G 阅读(616) 评论(1) 推荐(0) 编辑
摘要: 多语言 图片本地化 阅读全文
posted @ 2010-11-22 17:05 Sure-G 阅读(329) 评论(0) 推荐(0) 编辑