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

Overwritten insets #65

Open
Varrry opened this issue Sep 24, 2013 · 0 comments
Open

Overwritten insets #65

Varrry opened this issue Sep 24, 2013 · 0 comments

Comments

@Varrry
Copy link

Varrry commented Sep 24, 2013

Hi guys
I've localized a bug in your code

  • (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
    {
    if ([keyPath isEqualToString:@"contentInset"]) {
    if (!_ignoreInset) {
    self.originalContentInset = [[change objectForKey:@"new"] UIEdgeInsetsValue];
    self.frame = CGRectMake(0, -(kTotalViewHeight + self.scrollView.contentInset.top), self.scrollView.frame.size.width, kTotalViewHeight);
    }
    return;
    }
    ...

When animation starts, self.originalContentInset={top,left,bottom,right} and self.scrollView.contentInset={top+kOpenedViewHeight,left,bottom,right}. When, if I set scrollView's contentInset - the OpenedViewHeight-part of 'top' will be written to original 'top'; moreover, frame's height will be set to kTotalViewHeight while it is kOpenedViewHeight. As a result we have:
screenshot 2013 09 24 22 16 26

Thin line at the top isn't a cell, it's refresh view; download indicator is hidden under upper bar

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

1 participant