Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Something wrong when running on iOS7 #9

Open
mengxiangjian13 opened this issue Feb 21, 2015 · 11 comments · May be fixed by #13
Open

Something wrong when running on iOS7 #9

mengxiangjian13 opened this issue Feb 21, 2015 · 11 comments · May be fixed by #13

Comments

@mengxiangjian13
Copy link

When I run the example project in iOS7, I think it is a error.
ios simulator screen shot 2015 2 21 10 57 06

@mengxiangjian13
Copy link
Author

Could somebody please tell me how to fix this issue? Thanks.

@wesselj1
Copy link

I have the same issue on 7. :/

@arotob
Copy link

arotob commented Apr 6, 2015

Please am also having the same problem. is it that it does not work for iOS 7. it works for iPad 2 on the simulator but not on my iPad 2 device.

@artworkad
Copy link

+1

@mausvargas mausvargas linked a pull request May 1, 2015 that will close this issue
@mausvargas
Copy link

Also i noticed that on IOS7, it doesn't respect the background image set, will look more into this too.
The fix i PR here is related to the views positioning only right now.
If anyone comes with a better solution, would be great.

@shashankpatel
Copy link

@thekillerdev I do have a better solution however I don't have contribution permission to this repo.
screen shot 2015-06-01 at 11 13 19 am

@zengzhizhong
Copy link

@shashankpatel can you send a copy here?

@shashankpatel
Copy link

@zengzhizhong You will need to replace the method in JVFloatingDrawerSpringAnimator.m

Fixed method:

  • (void)applyTransformsWithSide:(JVFloatingDrawerSide)drawerSide sideView:(UIView *)sideView centerView:(UIView *)centerView {
    CGFloat direction = drawerSide == JVFloatingDrawerSideLeft ? 1.0 : -1.0;
    CGFloat sideWidth = sideView.bounds.size.width;
    CGFloat centerWidth = centerView.bounds.size.width;
    CGFloat centerViewHorizontalOffset = direction * sideWidth;
    CGFloat scaledCenterViewHorizontalOffset = direction * (sideWidth - (centerWidth - kJVCenterViewDestinationScale * centerWidth) / 2.0);

    CATransform3D sideTranslate3D = CATransform3DMakeTranslation(centerViewHorizontalOffset, 0.0, 0.0);
    sideView.layer.transform = sideTranslate3D;

    CATransform3D centerTranslate3D = CATransform3DMakeTranslation(scaledCenterViewHorizontalOffset, 0.0, 0.0);
    CATransform3D centerScale3D = CATransform3DMakeScale(kJVCenterViewDestinationScale, kJVCenterViewDestinationScale, 1.0);

    centerView.layer.transform = CATransform3DConcat(centerScale3D, centerTranslate3D);
    }

@shashankpatel
Copy link

When we set transformation on UINavigationControlller 's view using CGAffineTransform, on iOS 7, it only applies it to view's content. Navigation bar itself stays on top, hence creates weird effect. But when you use CATransform3D, it works fine on both OS versions. As desired by the original developer.

@pocketwod
Copy link

Sincerest thanks for sharing @shashankpatel , saved me a lot of heartache!!

@dsrees
Copy link

dsrees commented Jan 13, 2016

+1 @shashankpatel thanks for your answer. It was very helpful and solved the issue

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

Successfully merging a pull request may close this issue.

8 participants