iOS的Animation及键盘的回收

来源:互联网 发布:全国高校数据库sql 编辑:程序博客网 时间:2024/05/16 03:21

+(void)switchViewControllor:(int)index{

   //获取当前应用程序的代理对象

    AppDelegate *nowdelegate=[UIApplication sharedApplication].delegate;

    [UIView begincs:nil context:NULL];//启动动画

    [UIView setDuration:1];//设定动画时间

    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:nowdelegate.window cache:YES];//动画类型

[UIView cmmitAnimation];//执行动画


键盘输入后按return回收键盘

- (BOOL)textFieldShouldReturn:(UITextField *)textField{

    [textField resignFirstResponder];

    return YES;


原创粉丝点击