Fork me on GitHub

实现拍照时,画面闪一下效果

   UIView *flashView = [[UIView alloc] initWithFrame:[[self view] frame]];

    [flashView setBackgroundColor:[UIColor whiteColor]];
    [[[self view] window] addSubview:flashView];
    
    [UIView animateWithDuration:.4f
                     animations:^{
                         [flashView setAlpha:0.f];
                     }
                     completion:^(BOOL finished){
                         [flashView removeFromSuperview];
                         [flashView release];
                     }
     ];

posted on 2012-03-07 16:04  pengyingh  阅读(457)  评论(0)    收藏  举报

导航