iOS-Slide-Menu icon indicating copy to clipboard operation
iOS-Slide-Menu copied to clipboard

When in-call status bar is on animation is wrong

Open MrMeMr opened this issue 10 years ago • 9 comments

The slide performs an horizontal animation to (newX, 0) which causes a diagonal animation, and sets content in wrong y position.

MrMeMr avatar Mar 02 '15 16:03 MrMeMr

What version of the app are you using? Are you building against iOS8?

aryaxt avatar Mar 02 '15 17:03 aryaxt

no building against ios7.1

MrMeMr avatar Mar 02 '15 17:03 MrMeMr

Build against 8.0, or use the version that doesn't have iOS8 supports

aryaxt avatar Mar 02 '15 17:03 aryaxt

I need to support older devices though. I'm using version 1.4 of iOS-Slide-Menu

MrMeMr avatar Mar 02 '15 17:03 MrMeMr

You can build against 8.0 and still support older versions. Deployment target can be 6.0, base SDK could be 8.1

Let me know if that fixes the problem

aryaxt avatar Mar 02 '15 17:03 aryaxt

Sorry for the confusion. This is the current setup: Base sdk: 8.1 Deployment on simulator of iPhone 5 with iOS 7.1

MrMeMr avatar Mar 02 '15 18:03 MrMeMr

Will look into this

aryaxt avatar Mar 03 '15 01:03 aryaxt

You can fix this by calculating the extra status height:

/** Adjust for in-call, personal hotspot, status bar */ -(float)offsetFromTop { UIView *view = self.view; CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame]; CGRect statusBarWindowRect = [view.window convertRect:statusBarFrame fromWindow:nil]; CGRect statusBarViewRect = [view convertRect:statusBarWindowRect fromView:nil]; float fullHeight = statusBarViewRect.size.height; float offset = fullHeight; if (![UIApplication sharedApplication].statusBarHidden) offset -= STATUS_BAR_HEIGHT; return offset; }

Then use this in initialRectForMenu AND moveHorizontallyToLocation: rect.origin.y = [self offsetFromTop];

I've only tested this on IOS 8 (latest).

ebfhub avatar Mar 04 '15 18:03 ebfhub

solution from @ebfhub should works for me, thanks.

eJamesLin avatar Jun 22 '15 06:06 eJamesLin