zoukankan      html  css  js  c++  java
  • ios 页面滑入滑出

    从左边滑进

    CGRect r1,r2;

                r1 = app.testview.view.frame;

                r2 = self.view.frame;

                [app.testview.view setFrame:CGRectMake(320, r1.origin.y,r1.size.width,r1.size.height)];

                [UIView beginAnimations:nil context:nil];

                [UIView setAnimationDuration:0.4];

                [app.window addSubview:[app.testview view]];

                [app addConvertview];//添加遮挡层

                

                [self.view setFrame:CGRectMake(-320, r2.origin.y,r2.size.width,r2.size.height)];

                [app.testview.view setFrame:CGRectMake(0, r1.origin.y,r1.size.width,r1.size.height)];

                [UIView commitAnimations];

                [self performSelector:@selector(removeSelf) withObject:nil afterDelay:0.6];

    右边滑出

      CGRect r1,r2;

        r1 = app.TestView.view.frame;

        r2 = self.view.frame;

        [app.TestView.view setFrame:CGRectMake(-320, r1.origin.y,r1.size.width,r1.size.height)];

        [UIView beginAnimations:nil context:nil];

        [UIView setAnimationDuration:0.4];

    [app.window addSubview:[app.TestView view]];

        [app addConvertview];//添加遮挡层

        

        [self.view setFrame:CGRectMake(320, r2.origin.y,r2.size.width,r2.size.height)];

        [app.TestView.view setFrame:CGRectMake(0, r1.origin.y,r1.size.width,r1.size.height)];

        

        [UIView commitAnimations];

        [self performSelector:@selector(removeSelf) withObject:nil afterDelay:0.6];

  • 相关阅读:
    double类型比大小的故事
    研究TR1中的东西方向啊方向
    About DWMAPI.DLL
    谈谈Windows程序中的字符编码
    [收藏]使用Microsoft Visual C++来检测和隔离内存泄漏
    浅谈文字编码和Unicode(下)
    【NYOJ】[169]素数
    [bbk5222] 第111集 第14章 数据库空间管理 00
    Redo Log
    平台移植项目案例 32bit windows9i > 64bit suse linux 10g
  • 原文地址:https://www.cnblogs.com/XCoderLiu/p/3897561.html
Copyright © 2011-2022 走看看