Disable swipe on a view in SlidingPaneLayout - view

I need to disable swipe on a particular view in SlidingPaneLayout. I do not want to move view if user interacts on a particular view.

Related

How to drag a View Controller on top of a View Controller?

I have a View Controller that is presented when you first open the app, and I have another controller that can be shown on screen if you tap a button at the top of the screen. However, instead of doing it this way I was wondering if I can either drag the view down or tap the button and have an animation take care of that.
I have tried doing this with a PageView Controller, but this doesn't show the effect I wanted as it simply translates over to the next view and doesn't actually keep the initial view fixed in place while the second view slides over it.
Also, instead of a view controller would a view initially placed out of bounds in the main View Controller work? Thanks in advance!
You could use a side menu like MMDrawerController that has 4 type of animations for presenting the viewController.
Or you can create your custom UIView (not viewController) even using Interface Builder and animate that screen yourself. The animation can be started using UIScreenEdgePanGestureRecognizer.

Sheet presentation disables NSMagnificationGestureRecognizer

So I have a view with attached Pan and Magnify gesture recognisers in a view controller.
When I present the view controller using the Show, Modal or Presentation segues, both gesture recognisers work fine. But when I present it as a Sheet, only the Pan recogniser responds to input. The Magnify recogniser simply doesn't fire at all.
Sample project here. Use the buttons in the first window to show the view controller in different methods, and gesture anywhere in the presented view. The indicators will show which gestures have been recognised.

swift: slide in certain area to segue

I want to have a certain area of my mainViewContoller (mid of screen) where you can swipe left to go to another view. So I want it to work like a page view controller, but only in a certain area of the screen. How can I do this?
add a container view in your mainViewController
embed any view controller's view as container view's root view. If you want it to be a page view, set a page view controller's view as the root view.

OS X gesture and the responder chain

I have a window with a content view that does several things, including managing an iOS like navigation controller.
The window's content view front most view is an invisible custom view set here to manage drag n drop all over the window, called DragNDropView.
Now I want to manage the swipe gesture to navigate (left swipe only) in the navigation controller.
Unfortunately the DragNDropView catches the gesture (if I implement -(void)swipeWithEvent: and set acceptTouchEvents:YES on it), and I don't want that since I want the views behind it to catch it, so of course I set acceptTouchEvents to NO on the DragNDropView.
I'm suprised the gesture event does not "go down" the view hierarchy as the views below do have their acceptTouchEvents set to YES when the front most view has acceptTouchEvents set to NO.
If the front most view does not handle the gesture, the gesture event is not passed to the views behind it????
gestures handling seems to be in NSResponder, so I even expect my NSViewController subclass to handle it, but it seems I can't.
Can any one help me understanding the problem?

Swipe gesture without messing the navigation bar?

This is hard to explain but i'll try my best. I have a Table View controller that leads to 10 View controller. All the View controllers have a navigation bar title (The titles are the 10 objects from the Table view controller). Now i want to add the Swipe Gesture for a easier navigation between the 10 table view items (Instead of going back to the Table view manually i want the user to be able to swipe to change from a view controller to another). HERE'S THE PROBLEM: When i add the Swipe Gesture and i connect it from one view to another, it asks if i want the action to be either: Push, Modal or custom. Now, if i choose one of them, it makes the navigation bar title disappear. I want to keep the title without messing up the connection from the table view to the views controller. Thanks.
You want a pageviewcontroller. Set up the pages to be your different view controllers
A pageviewcontroller essentially allows you to do exactly what you want to do without having to setup a new segue every single time. That way it can all happen under one navigation bar. If you've seen the twitter app, you know how you can scroll through your feeds? Same thing.
There are tons of tutorials on the web, but pageviewcontroller a can be a tiny bit tricky because they require some logic
Here's a slightly more advanced thing that might be useful to you:
https://github.com/cwRichardKim/RKSwipeBetweenViewControllers

Resources