How to unhide view with animations

后端 未结 4 694
孤街浪徒
孤街浪徒 2021-02-19 03:47

Say I have a hidden view in Xcode for iOS. Now, when I set the view to not hidden (view.hidden=NO), how can I make it so that it now appears, but with animations?

4条回答
  •  执笔经年
    2021-02-19 03:51

    If you want other animations than only fading then use this method

    [UIView transitionWithView:_yourView duration:1.0 options:UIViewAnimationOptionTransitionCurlDown animations:^(void){
    
                [_yourView setHidden:NO];
    
            } completion:nil];
    

提交回复
热议问题