Inferis/ViewDeck — pull request #355 by groue (2013-04-25 10:02:16+00:00)
Title: Allow delegate to alter panners configuration while a panner is active.

"high-level" internal API for panners used to be `removePanners` and `addPanners`. New method `setNeedsAddPanners` should be preferred instead.

`setNeedsAddPanners` immediately replaces panners if no panner is active, or wait for the last active panner to complete before replacing them.

The consequence is that delegate methods that are fired during a panning touch can now safely change panner-related configuration, such as panningMode.

Before, those configuration change would invalidate an active panner, and prevent IIViewDeckController to perform panner completion cleanup code.

Here is the way to trigger a bug that this pull request fixes:

1. Have panningMode change, depending on which view controller is visible:

```objc
- (void)viewDeckController:(IIViewDeckController *)viewDeckController didOpenViewSide:(IIViewDeckSide)viewDeckSide animated:(BOOL)animated
{
viewDeckController.panningMode = IIViewDeckFullViewPanning;
}
- (void)viewDeckController:(IIViewDeckController *)viewDeckController didShowCenterViewFromSide:(IIViewDeckSide)viewDeckSide animated:(BOOL)animated
{
viewDeckController.panningMode = IIViewDeckNavigationBarPanning;
}
```

2. Run the app :-)

3. Open a side view controller

4. Hold and drag the navigation bar until the side is totally closed. The panner must be still active when the side gets closed.

5. Stop dragging

Result : user interaction is totally disabled :'(

Expected : user interaction is enabled :-)