Search code examples
objective-ciosxcodeuisplitviewcontroller

Does UISplitViewController only check presentsWithGesture once?


One of my detail views is using a slider, which naturally triggers a swipe gesture when someone moves it to the right. Unfortunately, this means that the popover view is called up, even when the user is actually trying to manipulate the slider controls.

I've tried setting presentsWithGesture to NO in only that view controller. Unfortunately, it doesn't work. I've checked and the property is getting set to no, so I don't have a clue what's going on there. If I setPresentsWithGesture earlier in the process, namely in my AppDelegate's appDidFinishLaunching code, everything works perfectly -- except I lose present with gesture on every other page, too.

Edit: To make it clear, my question is if that value is actually checked only once and then ignored (bad apple!) or am I doing something wrong?

-(void)viewWillAppear:(BOOL)animated
{
    //code
    splitView.presentsWithGesture=NO;
    NSLog(@"Split view presents: %i", splitView.presentsWithGesture);//results in '0'
}

Solution

  • It's actually checked several different times, there was simply something wrong with my code.