Skip to content

Overwritten insets #65

@Varrry

Description

@Varrry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions