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

Fixed warning on Xcode 7.x #215

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions MFSideMenu/MFSideMenuContainerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,13 @@ - (UIStatusBarStyle)preferredStatusBarStyle {
#pragma mark -
#pragma mark - UIViewController Rotation

-(NSUInteger)supportedInterfaceOrientations {
if (self.centerViewController) {
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
- (NSUInteger)supportedInterfaceOrientations
#else
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
#endif
{
if (self.centerViewController) {
if ([self.centerViewController isKindOfClass:[UINavigationController class]]) {
return [((UINavigationController *)self.centerViewController).topViewController supportedInterfaceOrientations];
}
Expand Down Expand Up @@ -547,7 +552,7 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceive
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
if ([gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]]) {
CGPoint velocity = [(UIPanGestureRecognizer *)gestureRecognizer velocityInView:gestureRecognizer.view];
BOOL isHorizontalPanning = fabsf(velocity.x) > fabsf(velocity.y);
BOOL isHorizontalPanning = fabs(velocity.x) > fabs(velocity.y);
return isHorizontalPanning;
}
return YES;
Expand Down Expand Up @@ -791,4 +796,4 @@ - (CGFloat)animationDurationFromStartPosition:(CGFloat)startPosition toEndPositi
return MIN(duration, self.menuAnimationMaxDuration);
}

@end
@end