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

Weird photos alignment on iOS 7 #126

Closed
aDev123 opened this issue Sep 6, 2013 · 10 comments
Closed

Weird photos alignment on iOS 7 #126

aDev123 opened this issue Sep 6, 2013 · 10 comments

Comments

@aDev123
Copy link

aDev123 commented Sep 6, 2013

Since in iOS 7 has changed the origin of coordinates, and since wantsFullScreenLayout has been deprecated, photos are aligned in wrong ways.

@JonErickson
Copy link

I have noticed this too. Have not found a workaround yet though.

@clouddistortion
Copy link

I got the same problem and already added a comment on #105 so maybe it's worth looking at that comment too

@1337domz
Copy link

If you add the following right at the top of viewDidLoad in MWPhotoBrowser.m it solves the issue (and everything still works fine in iOS6)

if ([self respondsToSelector:@selector(edgesForExtendedLayout)]){
    self.edgesForExtendedLayout = UIRectEdgeNone;
}

@clouddistortion
Copy link

Hi,
if you do UIRectEdgeNone you can not view the image in fullscreen it always stops at the bounds of the navigation/toolbar.

@1337domz
Copy link

Ah you're right. I'm a bit of a noob with iOS programming. It feels like we need to remove 20px from a frame somewhere but I don't know what I am doing to be honest, just hacking around trying things

@clouddistortion
Copy link

:) ... but if you set it up as you proposed the images are only swipeable horizontally (like on ios6).

... I don t get it either

@1337domz
Copy link

OK think I have found a proper solution now, again in viewDidLoad:

if ([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)]){
    self.automaticallyAdjustsScrollViewInsets = NO;
}

Got it from the iOS7 Transition Guide:

https://developer.apple.com/library/ios/documentation/userexperience/conceptual/TransitionGuide/AppearanceCustomization.html

@diogeneshamilton
Copy link

That looks right, anyone want to open a PR?

@brjairosanches
Copy link

Thank you very much. works great here.
I'm using xcode 5 and IOS 7.

I Changed MWPhotoBrowser.m (viewDidLoad) adding the following code:

if ([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)]){
self.automaticallyAdjustsScrollViewInsets = NO;
}

@mwaterfall
Copy link
Owner

This is now fixed ;-) Thanks your patience!

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

No branches or pull requests

7 participants