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

iPhone 6 and iPhone 6 + Sizing #19

Open
eni9889 opened this issue Sep 20, 2014 · 7 comments
Open

iPhone 6 and iPhone 6 + Sizing #19

eni9889 opened this issue Sep 20, 2014 · 7 comments

Comments

@eni9889
Copy link

eni9889 commented Sep 20, 2014

I'm having trouble getting the parallax view to have the correct width on iPhone 6 and 6+ any help would be great.

@cerupcat
Copy link

Have you figured out any fixes for this?

@tomekc
Copy link

tomekc commented Oct 17, 2014

It looks like initial bounds of TableView are same as designed in IB. After re-layout numbers become correct. I used something like that in VC:

- (void)viewWillLayoutSubviews {
    [super viewWillLayoutSubviews];
    CGRect rect = self.tview.parallaxView.frame;
    rect.size.width = self.view.frame.size.width;
    self.tview.parallaxView.frame = rect;
}

However, the problem I found on iOS8 is that parallax header height is increased by height of navigation bar and status bar (+64 pts).

@Jeehut
Copy link

Jeehut commented Nov 30, 2014

I'm having the same issue @tomekc with the navigation and status bar. Couldn't figure out a fix yet.
Can anyone help?

@markst
Copy link

markst commented Jan 21, 2015

APParallaxView *parallaxView = [[APParallaxView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, height)];

could do with being:

APParallaxView *parallaxView = [[APParallaxView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth([UIScreen mainScreen].bounds), height)];

or creating layout constraints to be same width as superview. right now it seems as if the auto generated constraints are by width rather that leading & trailing constraints to the superview.

@markst
Copy link

markst commented Jan 21, 2015

or:
[parallaxView setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];
before adding: [self addSubview:parallaxView]

@alexanderlipsett
Copy link

Having the same issue with an iPhone 6 on iOS 8. Tried @markst 's suggestions but I'm still seeing the issue. Anyone figured out a fix? Alternatively, anyone know of a good alternative library?

@ofawx
Copy link

ofawx commented Nov 8, 2015

Was also having problems with the navigation and status bar in iOS7+, just found a workaround by making the bottom of the navigation bar the top of the view, by placing the following in the View Controller:

ObjC:

self.edgesForExtendedLayout = UIRectEdgeNone;

Swift:

self.edgesForExtendedLayout = UIRectEdge.None

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