Skip to content

1.1.0

Compare
Choose a tag to compare
@Friend-LGA Friend-LGA released this 03 Dec 17:06
· 193 commits to master since this release
  • Carthage framework was renamed: LGSideMenuControllerFramework -> LGSideMenuController. You need to re-add framework file.
  • Refactored to support new swift features like nullable and nonnull objects.
  • Minimal iOS version increased to 8.0
  • Fixed bugs in demo projects.
  • Add new swift demo project without storyboard.
  • Renamed notifications:
LGSideMenuControllerWillShowLeftViewNotification
LGSideMenuControllerWillDismissLeftViewNotification
LGSideMenuControllerDidShowLeftViewNotification
LGSideMenuControllerDidDismissLeftViewNotification

LGSideMenuControllerWillShowRightViewNotification
LGSideMenuControllerWillDismissRightViewNotification
LGSideMenuControllerDidShowRightViewNotification
LGSideMenuControllerDidDismissRightViewNotification
  • Deprecated some methods:
// LGSideMenuController.h

// OLD
- (void)showHideLeftViewAnimated:(BOOL)animated completionHandler:(LGSideMenuControllerCompletionHandler)completionHandler DEPRECATED_ATTRIBUTE;
- (void)showHideRightViewAnimated:(BOOL)animated completionHandler:(LGSideMenuControllerCompletionHandler)completionHandler DEPRECATED_ATTRIBUTE;

// NEW
- (void)toggleLeftViewAnimated:(BOOL)animated completionHandler:(LGSideMenuControllerCompletionHandler)completionHandler;
- (void)toggleRightViewAnimated:(BOOL)animated completionHandler:(LGSideMenuControllerCompletionHandler)completionHandler;
// UIViewController+LGSideMenuController.h

// OLD
- (IBAction)openLeftView:(nullable id)sender DEPRECATED_ATTRIBUTE;
- (IBAction)openRightView:(nullable id)sender DEPRECATED_ATTRIBUTE;

// NEW
- (IBAction)showLeftViewAnimated:(nullable id)sender;
- (IBAction)showRightViewAnimated:(nullable id)sender;
  • Added new IBActions:
// LGSideMenuController.h

- (IBAction)showLeftView:(nullable id)sender;
- (IBAction)hideLeftView:(nullable id)sender;
- (IBAction)toggleLeftView:(nullable id)sender;

- (IBAction)showLeftViewAnimated:(nullable id)sender;
- (IBAction)hideLeftViewAnimated:(nullable id)sender;
- (IBAction)toggleLeftViewAnimated:(nullable id)sender;

- (IBAction)showRightView:(nullable id)sender;
- (IBAction)hideRightView:(nullable id)sender;
- (IBAction)toggleRightView:(nullable id)sender;

- (IBAction)showRightViewAnimated:(nullable id)sender;
- (IBAction)hideRightViewAnimated:(nullable id)sender;
- (IBAction)toggleRightViewAnimated:(nullable id)sender;
// UIViewController+LGSideMenuController.h

- (IBAction)showLeftView:(nullable id)sender;
- (IBAction)hideLeftView:(nullable id)sender;
- (IBAction)toggleLeftView:(nullable id)sender;

- (IBAction)showLeftViewAnimated:(nullable id)sender;
- (IBAction)hideLeftViewAnimated:(nullable id)sender;
- (IBAction)toggleLeftViewAnimated:(nullable id)sender;

- (IBAction)showRightView:(nullable id)sender;
- (IBAction)hideRightView:(nullable id)sender;
- (IBAction)toggleRightView:(nullable id)sender;

- (IBAction)showRightViewAnimated:(nullable id)sender;
- (IBAction)hideRightViewAnimated:(nullable id)sender;
- (IBAction)toggleRightViewAnimated:(nullable id)sender;
  • Change behaviour of sideMenuController method in UIViewController+LGSideMenuController.h
    Now it returns sideMenuController only if current view controller really one of child view controllers of LGSideMenuController:
- (nullable LGSideMenuController *)sideMenuController {
    if ([self isKindOfClass:[LGSideMenuController class]]) {
        return (LGSideMenuController *)self;
    }

    if (self.parentViewController.sideMenuController) {
        return self.parentViewController.sideMenuController;
    }

    if (self.navigationController.sideMenuController) {
        return self.navigationController.sideMenuController;
    }

    if (self.presentingViewController.sideMenuController) {
        return self.presentingViewController.sideMenuController;
    }

    if (self.splitViewController.sideMenuController) {
        return self.splitViewController.sideMenuController;
    }

    return nil;
}