摘要:
非常简单,定义一个动画就行了,直接上代码 CATransition* transition = [CATransition animation]; transition.type = kCATransitionPush;//可更改为其他方式 transition.subtype = kCATransitionFromTop;//可更改为其他方式 [self.navigationController.view.layeraddAnimation:transition forKey:kCATransition]; [self.navigationControlle... 阅读全文
摘要:
在init方法里注册这两个通知 [[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(keyboardwasShown:) name:UIKeyboardDidShowNotificationobject:nil]; [[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(keyboardwasHidden:) name:UIKeyboardDidHideNotificationobject:nil];别忘了在dea. 阅读全文
摘要:
原文地址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 阅读全文