Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick swiping results in view completely disappearing #28

Closed
Amnell opened this issue Aug 12, 2013 · 16 comments
Closed

Quick swiping results in view completely disappearing #28

Amnell opened this issue Aug 12, 2013 · 16 comments

Comments

@Amnell
Copy link

Amnell commented Aug 12, 2013

When quickly swiping the view controller to the right it sometimes disappears completely, leaving me with only the menu. When selecting a menu item the only thing happening is the statusbar changing color. To get the view controller back i have to shut down the app and relaunch it.

(This is from the example project)

Edit: I can replicate it on iOS6 and iOS7

Example

@ramki1979
Copy link

I am working on this for last 2days but not able to find the reason. I have added some NSLog's to the Example code...

This is what I observed,

2013-08-15 18:57:54.363 RESideMenuExample[7674:907] Home action is called 2013-08-15 18:57:54.377 RESideMenuExample[7674:907] viewDidLoad 2013-08-15 18:57:54.385 RESideMenuExample[7674:907] viewWillAppear

After playing with fast gestures the view disappeared.
Now the view has gone outside of the screen and neither viewWillDisappear nor viewDidDisappear is called..

Now I selected the "Explore" menuItem and the log is below

2013-08-15 18:59:40.589 RESideMenuExample[7674:907] Explore action is called
2013-08-15 18:59:40.596 RESideMenuExample[7674:907] viewWillDisappear
2013-08-15 18:59:40.601 RESideMenuExample[7674:907] viewDidLoad
2013-08-15 18:59:40.604 RESideMenuExample[7674:907] viewWillAppear
2013-08-15 18:59:40.610 RESideMenuExample[7674:907] viewDidDisappear

as far as iOS is concerned the Home viewController is disappeared now and Explore viewController is loaded and displayed, but we are only able to see the RESideMenu viewController.

Have anyone have any idea what going wrong here..

@romaonthego
Copy link
Owner

It looks like this problem only occurs when there a swipe-to-open gesture is present:

[self sideMenu] showFromPanGesture:sender];

Can you confirm that? I've been trying to reproduce it without this code and the issue seems to disappear.

@ramki1979
Copy link

@romaonthego If we use taps(click on the Navigation Menu) rather than swipe-right gesture then there is no issue.

The issue only exist's only when we use swipe to right gesture and when the swipe is very fast.

[self sideMenu] showFromPanGesture:sender]; this will disable the swipe feature entirely..

@LukeLu1263
Copy link

substitute [[self sideMenu] show] for [self sideMenu] showFromPanGesture:sender];

@ramki1979
Copy link

@LukeLu1263 it don't solve the problem. It just imitating the "menu" functionality.

I might use this only when I don't have the "menu" button or it's navigation set to some other feature of the app.

@LukeLu1263
Copy link

  • (void)viewDidLoad
    {
    [super viewDidLoad];
    [self addPanGesture:self.view];
    }
  • (void)addPanGesture:(UIView *)view
    {
    UISwipeGestureRecognizer *swipeGesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeHandler:)];
    swipeGesture.direction = UISwipeGestureRecognizerDirectionRight;
    [view addGestureRecognizer:swipeGesture];
    }
  • (void)swipeHandler:(UIPanGestureRecognizer *)sender
    {
    // [[self sideMenu] showFromPanGesture:sender]; // bug
    [[self sideMenu] show];
    }

@ramki1979
Copy link

@LukeLu1263 what I mean when It just imitating the "menu" functionality. user will no longer able to control the gesture animation.

Once the user swipeGesture is recognised the show selector is called and animation starts and gets completed without any further control on the user part and remain's as static view irrespective of whether user still panning or not.

@LukeLu1263
Copy link

Oh! I got it. but this app doesn't made by me. May be the origin maker will solve this problem. what you want, so am I.

@LukeLu1263
Copy link

the bug is not only this one. there's another issue that if you call swipeGesture to switching, the demoVC will not call viewDidLoad and if tap item, the demoVC will call viewDidLoad again. Set the demoVC to be the global variable also doesn't work. How can I do? Is it possible that I modify this code by myself?

@michelzanini
Copy link

This is a major bug. Please fix it. Thanks =]

@ninewine
Copy link

This bug is alway there, Please check it out.

@LukeLu1263
Copy link

Haha! Try yourself. iOS 7 already came.

@jxdwinter
Copy link

+1, please fix this. Thank you.

@satheeshwaran
Copy link

Please fix this issue, the control is awesome. This issue is occurring often in device.

@satheeshwaran
Copy link

Awesome fix, thanks a ton!

@LukeLu1263
Copy link

Amazing fix, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants