摘要: 非常简单,定义一个动画就行了,直接上代码 CATransition* transition = [CATransition animation]; transition.type = kCATransitionPush;//可更改为其他方式 transition.subtype = kCATransitionFromTop;//可更改为其他方式 [self.navigationController.view.layeraddAnimation:transition forKey:kCATransition]; [self.navigationControlle... 阅读全文
posted @ 2013-05-26 22:43 小白猪jianjian 阅读(7867) 评论(0) 推荐(1) 编辑
摘要: 在init方法里注册这两个通知 [[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(keyboardwasShown:) name:UIKeyboardDidShowNotificationobject:nil]; [[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(keyboardwasHidden:) name:UIKeyboardDidHideNotificationobject:nil];别忘了在dea. 阅读全文
posted @ 2013-05-26 22:36 小白猪jianjian 阅读(2971) 评论(0) 推荐(0) 编辑
摘要: 原文地址http://blog.sina.com.cn/s/blog_884e78b20100u0pp.html第一种:CGContextRef context = UIGraphicsGetCurrentContext();[UIView beginAnimations:nil context:context];[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];[UIView setAnimationDuration:kDuration];//动画时间[UIView setAnimationTransition:UIViewAn 阅读全文
posted @ 2013-05-26 20:47 小白猪jianjian 阅读(5144) 评论(0) 推荐(0) 编辑