Home 实现模态跳转透明效果
Post
Cancel

实现模态跳转透明效果

示例代码如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
- (IBAction)modal:(id)sender {
    
    UIStoryboard * sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    
    ModalViewController * mvc = [sb instantiateViewControllerWithIdentifier:@"ModalViewController"];
    
    self.definesPresentationContext = YES;//允许设置模态跳转的样式
    
    mvc.modalPresentationStyle = UIModalPresentationOverCurrentContext;//设置模态跳转的样式
    
    [self presentViewController:mvc animated:true completion:nil];

}

运行结果:

This post is licensed under CC BY 4.0 by the author.

将图片保存到本地相册

ReactiveCocoa (2)信号的订阅、取消订阅、接收