我的uiview的圆角在pushSegue期间更新

时间:2018-12-18 17:01:19

标签: ios navigation push transition cornerradius

我的控制器视图有底角。当我从VC1推到VC2时,在过渡过程中将获得尖角,而在过渡后将设置圆角。我希望我的观点在过渡期间能够圆滑。要获得更高的准确性,请查看下面的GIF。

视频示例(过渡期间重置了角底)

https://www.postgresql.org/docs/9.5/plperl-under-the-hood.html

代码VC 1 (vc按钮)

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    self.view.layer.cornerRadius = 10;
    self.view.clipsToBounds = YES;

    [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
    self.navigationController.navigationBar.shadowImage = [UIImage new];
    self.navigationController.navigationBar.translucent = YES;
}

代码VC 2 (第二个vc)

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    self.view.layer.cornerRadius = 10;
    self.view.clipsToBounds = YES;

    [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
    self.navigationController.navigationBar.shadowImage = [UIImage new];
    self.navigationController.navigationBar.translucent = YES;
}

0 个答案:

没有答案