iOS:在PageViewController中滚动页面时隐藏边框

时间:2015-09-17 13:07:11

标签: ios border uipageviewcontroller

如何使页面与PageViewController视图的边框重叠?

我设置了这样的视图寄宿:

self.view.layer.borderColor = [UIColor lightGrayColor].CGColor;
self.view.layer.borderWidth = 1.f;

PageViewController

1 个答案:

答案 0 :(得分:0)

您只需执行此操作即可隐藏边框:

self.view.layer.borderColor = [UIColor clearColor].CGColor;

 self.view.layer.borderWidth = 0; 

我希望您使用此方法来转换带有动画的页面:

 - (void)setViewControllers:(NSArray *)viewControllers 
                 direction:(UIPageViewControllerNavigationDirection)direction 
                  animated:(BOOL)animated 
                completion:(void (^)(BOOL finished))completion;`

尝试在动画开始时隐藏边框,并在动画完成时恢复边框。