简体   繁体   English

如何停止手势滑动回上一个视图控制器?

[英]How to stop gesture swiping back to previous view controller?

In one of my view controllers I have a carousel that the user can swiper through. 在我的一个视图控制器中,我有一个旋转木马,用户可以在其中旋转。 But if the user swipes up in the top left hand corner of the screen they can drag back the previous view controller. 但是,如果用户在屏幕的左上角向上滑动,则可以向后拖动以前的视图控制器。

How can I stop this? 我该如何阻止呢? It could be something to do with this? 这可能与这有关吗?

- (void) viewWillDisappear:(BOOL)animated
{
    [self.carousel setHidden:YES];
}
- (void) viewWillAppear:(BOOL)animated
{
    [self.carousel setHidden:NO];
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM