在ios中使用CoreAnimation加入动画
摘要:使用前要在build phases中加入QuartzCore.framework还要#import <QuartzCore/QuartzCore.h>在我的代码中,newView和self.currentView应该是frame相同,两个叠在一起的,执行前new在下current在上重叠可以用[self.view insertSubview:newView atIndex:0];实现 1 // 使用Core Animation创建动画 2 3 // 创建CATransition对象 4 CATransition *animation = [C...
阅读全文
posted @
2012-12-04 10:45
Entreri
阅读(201)
推荐(0)
ios开发之loadview
摘要:在纯代码写界面的时候,应该在UIViewController的loadView中创建控件.这时候对[super loadView]函数的调用是有一些讲究的.- (void)loadView{ //在loadView开始的时候调用[super loadView],系统会把self.view创建一个空的view,于是我们可以把自己创建和要添加的控件作为该view的subview添加. [super loadView]; UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; orderButto...
阅读全文
posted @
2012-12-01 16:08
Entreri
阅读(505)
推荐(0)