Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
5020
SideMenuView Issues
posted

Hi,

I'm seeing issues with the SideMenuView (not slide tab).

If you create a SideMenuView without a rect via [IGSideMenuView new] the resulting contentView doesn't get sized correctly. Init without a rect is common for auto layout users. To test this, set the side view's backgroundColor to redColor and the side view's contentView.backgroundColor to orangeColor. Notice how with auto layout, when the view gets its layout, the contentView is not resized.

Additionally, I can't seem to get presentsWithGesture or minimumPressDuration working properly. The pan gesture fires instantly 99% of the time. Ideally, this view would use UIScreenEdgePanGestureRecognizer on either side. Can I disable the default gesture and add my own and then trigger -openSideMenu: manually?

Parents
No Data
Reply
  • 4940
    Offline posted

    Hi Caylan,

    Here's the answers to your questions.

    When using auto layout, why doesn't the contentView get sized correctly?

    During initialization of the control the contentView is added as a subview of IGSideMenuView and does attempt to take the same size, but fails to set a proper size because iOS has not yet finished calculating it. You can manually set the contentView frame in the viewDidLayoutSubviews method of your view controller.

    Can I disable the long press default gesture and add my own?

    Yes, if you disable presentsWithGesture, the default gesture is removed from the contentView. When a custom gesture is added to the contentView, you can call openSideMenu: to expose the menu or closeSideMenu to close it.

    Why doesn't the IGSideMenuView have a delegate call like the grid's cellLocationInViewPortChanged?

    It does! The IGSideMenuViewDelegate has the following methods.

    • – sideMenuView:contentViewLocationDidChange:
    • – sideMenuView:sideDidClose:
    • – sideMenuView:sideWillClose:
    • – sideMenuView:sideDidOpen:
    • – sideMenuView:sideWillOpen:

    As far as the issue with velocity, I'll need to do some research to see if I can reproduce what you've experienced. If it's reproducible I'll create a bug in our system and attach it to your case.

Children
No Data