objc 笔记

1.//顺时针旋转180度       

 splashView.transform=CGAffineTransformMakeRotation(180.0 * M_PI/180);


2.注册计时器

    timer = [NSTimerscheduledTimerWithTimeInterval:1.3f

                                             target:self

                                           selector:@selector(timeOutHandler)

                                           userInfo:nil

                                            repeats:YES];

-(void)timeOutHandler

{}

 

3. objc 界面动画

[UIViewtransitionWithView:self.windowduration:1.0f options:UIViewAnimationOptionTransitionNone

    animations:^(void)

    {

        splashView.alpha=0.0f;

    }

    completion:^(BOOL finished)

     {

  }

4. 通知

         [[NSNotificationCenterdefaultCenter] addObserver:self

                                                  selector:@selector(loginPlatformSuccessHandler:)

                                                      name:(NSString *)@"login_platform_success"

                                                    object:nil];

  删除通知

  

    [[NSNotificationCenterdefaultCenter] removeObserver:self

                                          name:(NSString *)@"login_platform_success"

                                          object:nil];

  

  

原文地址:https://www.cnblogs.com/howeho/p/3037906.html