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

XHNeteaseNewsViewController中的contentViewForPage:方法在XHNewsContainerViewController未定义 #22

Closed
shift0106 opened this issue May 23, 2014 · 1 comment

Comments

@shift0106
Copy link

XHNeteaseNewsViewController.m中contentViewForPage:定义如下:

  • (XHContentView *)contentViewForPage:(NSInteger)page {
    static NSString *identifier = @"XHContentView";
    XHContentView *contentView = (XHContentView *)[self dequeueReusablePageWithIdentifier:identifier];
    if (contentView == nil) {
    contentView = [[XHContentView alloc] initWithIdentifier:identifier];
    contentView.pullDownRefreshed = YES;
    contentView.refreshControlDelegate = self;
    }
    if (!page)
    contentView.tableView.tableHeaderView = self.scrollBannerView;
    else
    contentView.tableView.tableHeaderView = nil;
    return contentView;
    }

但是我再XHNewsContainerViewController.h中没有找到该方法,只存在:

  • (XHContentView *)contentViewAtPage:(NSInteger)page;

我将XHNeteaseNewsViewController.m中contentViewForPage:替换成contentViewAtPage:后运行时发现顶部滑动banner消失

Uploading screenshot.png . . .

@xhzengAIB
Copy link
Member

@shift0106
嗯!这个是公开有点误导,现在修改过来了,具体看wiki文档里面的描述

Jack

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

2 participants