Disable Swipe gesture for SideNavigationController Material Kit Swift - ios

I am using SideNavigationController in my app for side menu and its working fine. In my case I want to open Left View and Right View on button click.
And I am able to do that using methods
openLeftView()
openRightView()
Now, the problem is Left and Right view also open when user swipe left or right. I want to avoid the opening of left and right view on swipe/gesture. I am using Embedded framework of Material Kit and currently not able to find any property that can be set to avoid swipe/ gesture detection.

please update to the latest, and set
SideNavigationController.enabledRightPanGesture = false
That will disable the right pan gesture, which will disable the ability to open the rightView using the panning gesture.

Related

Accessibility voiceover single swipe gestures in Swift IOS

I am working on the IOS application, related to voice over, my Question is : When accessibility voice over was enabled how can i get the swipe gestures left, right, top and down, what re the function for detecting these in swift?
First of all, you need to let VoiceOver know that about your view (or another element). So if you are in a view controller, this should work: self.view.isAccessibilityElement = true
Second, you need to let VoiceOver know that your view will handle user interactions on its own: self.view.accessibilityTraits = UIAccessibilityTraitAllowsDirectInteraction. After that your view should start getting gestures notifications.
Here's another relevant answer: https://stackoverflow.com/a/20712889/2219578
It isn't possible to catch the left, right, top and bottom VoiceOver gestures : I've seen neither a protocol nor a kind of notification for this.
However, you can detect a scrolling action and be aware of the element focus provided by VoiceOver.

Looking to create a tap and hold button to generate more buttons

So if any of you have used the tumblr mobile app recently, you'll notice that the reblog function has a tap and hold capability. Essentially when you tap and hold the reblog button, more buttons pop up around it so the user can just drag their finger over one of the new buttons and release to select it. I've been digging around and no one seems to have an answer to this specific question.I've always seen this as a very elegant way to have a sub menu and would like to implement it into my own apps. For ios btw.
Add gesture recognizer to a view. write a method to create buttons when long press gesture is done on the view.

iOS Simulator - partial swipe left with appium to view button

Hi All,
I need to achieve partial swipe left to view button on right side.
I tried multiple solutions found here and official forum but all the resulting in tap action being triggered on the row.
None of them resulted in partial left swipe.
any idea how to achieve it ?
Thanks in advance
From what I understand you might performing this swipe with end point located around that button/row you try to make visible?
If e.g. this row with a button is located lets say between 45%-50% of the height of the screen you need to perform this swipe below or above it on the background to not interact with the element itself during the swipe action which is a touch and move to action after all.

iOS Left menu by button using MMDrawerController

I got some troubles making button for open/close leftside menu.
I made a button, but I can not configure it correctly, because I can't recognize whether the left view is open. It can be opened by swipe(special MMDrawer method), so I can't use a regular BOOL variable lika 'isOpen'. Also, I find it difficult to find a property for left view status (open/close).
I was surprised, that noone had trouble like this.
You could use the openSide property of MMDrawerController.
The current open side of the drawer.
Note this value will change as soon as a pan gesture opens a drawer, or when a open/close animation is finished.
As soon as the left view is opened, the value should change to MMDrawerSideLeft.

Override Control Center screen edge pan from bottom?

I’d like to use a UIScreenEdgePanGestureRecognizer on the bottom edge of my display. The recognizer works perfectly if I set its edges to UIRectEdgeLeft or UIRectEdgeRight, but UIRectEdgeTop or UIRectEdgeBottom do not work – they’ve overridden by some UISystemGestureGateGestureRecognizer.
I’m actually trying to override the Control Center in the same way that Facebook Paper has managed to do – figured the screen edge pan may have been their trick. Paper allows you to scroll from the bottom screen edge to pull their menu up, and Control Center doesn’t pop up at all. It’s definitely possible, I’m just wondering how they’ve done it.
Any thoughts?
There is a trick that lets you prevent the accidental launch of the Control Center. Just disable the status bar. Then on swipe the user will be prompted whether the control centre have to be launched or not.
It won't be launched in a single swipe. Instead an arrow appears on the first swipe and the user need to click and drag the arrow to launch the control centre, hence prevent accidental launch. Use this code to disable status bar.
I don't know if it will work in your case and your gesture recognizer will be fired but I would give it a try.
You can disable the status bar using this delegate method:
- (BOOL) prefersStatusBarHidden
{
return YES;
}
Hope it helps.
I don't know what I'm doing wrong but because the Facebook app hides the status bar they happen have the same behavior as in all full-screen apps in iOS.
I have tested it multiple times - the Control Center does not pop up, but the little tiny arrow to bring it up - does.
So your assumption is wrong - Facebook didn't disable Control Center, nor did they override any behaviors. The just hid the statusBar across the whole app.
Just set the key value View controller-based status bar appearance to NO in plist. Then hide it.
And it is the way to go.
And BTW, when you swipe the apps view down to reveal your profile and the status bar appears - try to swipe up from the very bottom edge of the screen. Believe me, you'll be totally amazed.
There's no magic here, no nothing. Facebook are big but they can't defy iOS rules. And I'd like it to be that way, honestly.
Here's the video of the process:
http://www.youtube.com/watch?v=A2CWvhxhGoY&feature=youtu.be
How about using UISwipeGestureRecognizer instead?

Resources