Coder Social home page Coder Social logo

jackteam / xhnewsframeworkexample Goto Github PK

View Code? Open in Web Editor NEW
424.0 65.0 123.0 30.32 MB

XHNewsFramework是一个快速的集成和开发框架的新闻应用程序,在仿网易新闻应App的基础上完成的框架。XHNewsFramework is a fast integration and development of the framework of news app, base on Netease App build.

License: MIT License

Objective-C 100.00%

xhnewsframeworkexample's Issues

左侧菜单切换

1.点左侧菜单切换后,我修改items,当items只有一个的时候也可以向右滑动,滑动报错。
2.在最左侧向右拖动速度较快的时候里面的字会晃动,这个能修复不

新的框架功能需求

1:主动触发下拉刷新的方法
2:ContentView切换时触发的代理方法

支持你的框架 并希望你能做的更好

添加的新闻详情页面(使用了一个UIScrollView)不能滑动

新闻列表页项目点击事件如下:
(void)contentView:(XHContentView *)contentView didSelectRowAtIndexPath:(XHPageIndexPath *)indexPath {
GTNewsViewController *newsViewController = [[GTNewsViewController alloc] init];
newsViewController.news = [channelManager channelNews:indexPath.page newsIndex:indexPath.row];
[parallaxNavigationController pushViewController:newsViewController animated:YES];
}
新闻详情页面初始化UIScrollView部分:
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:applicationFrame];
scrollView.contentSize = CGSizeMake(applicationFrame.size.width, MAXFLOAT);
scrollView.delegate = self;
self.view = scrollView;
最后根据实际大小更新contentSize
UIScrollView *scrollView = (UIScrollView *)self.view;
scrollView.contentSize = CGSizeMake(320, self.newsContent.bottom);

UIScrollView的触摸事件会被框架接收处理吗?还是我对scroll view的处理有错误呢?

XHMENU

能否把XHmenu的数据源改成可变的

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

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 . . .

一些新需求

1:可设置侧滑手势是否启用,因为push到另外一个界面不需要侧滑手势
2:希望能给出demo中的Items、unItems 以及 XHDetail详尽用法
3:希望你能够在demo中添加异步获取数据并应用到各个Item界面 以及 添加更多的Item 的操作,因为还不是很了解你框架的运行机制和生命周期。(这个对于我非常需要哦~~)

在改动Items和UnItems 刷新出现bug

21dff480-e2f8-4ba0-b299-7c084b7c72d2

在删除当前显示的item的时候出现这样的显示错误,希望Jack能够修复 ,再也希望Jack能帮助我修改好我的重用问题,再次十分感谢!!

添加一个Demo,功能如下:

@DaidoujiChen
@RegenHo
1、先添加第三方库,AFNetworking做访问层的处理
2、有哪个好心人可以提供一下在线数据接口??
3、正常操作和处理数据加载和显示
4、添加详细页,主要显示富文本新闻内容,多种媒体显示

Jack

下拉刷新和上拉加载的问题

1.当一页的数据不够全屏的时候,比如只有两条数据这个时候下拉刷新好像失效了,并且下拉没有圆圈加载条。
2.XHContentView的setPullUpRefreshed:NO 这个方法没有效果,设置了下面的加载圆圈还是有。

如何设置自定义新闻详情页面

点击新闻列表中的一个项目时会调用XHContentViewDelegate的contentView:didSelectRowAtIndexPath:方法。该方法在XHNeteaseNewsViewController.m中定义如下:

  • (void)contentView:(XHContentView *)contentView didSelectRowAtIndexPath:(XHPageIndexPath *)indexPath {
    NSLog(@"row : %d section : %d page : %d", indexPath.row, indexPath.section, indexPath.page);
    [super contentView:contentView didSelectRowAtIndexPath:indexPath];
    }
    没有演示如何使用自定义详情页。
    我在XHNewsContainerViewController.h中也没有找到可能的与设置自定义详情页相关的方法。能提供设置自定义详情页的示例代码吗?

出现问题,求助

untitled

滑动到第四页之后(包括第四页) 加载的页面和背景成为前面页面的背景,而且从最后一页往回滑动时候,还会出现空白,重新从第一页滑动过去,空白消失。这是我的ContentViewForPage的方法

qq20140506-1

一些bug

iOS6有bug,启动不了。
给tableview加了下啦刷新用不了,等更新

ios6新闻详情手势返回

在ios6下,进新闻详情,用手势返回的时候可以看到上一级的NavigationBar的高度比当前这个NavigationBar的高度要高一点点,所以返回到主页之后,主页会有一个明显的抖动,如果用左上角按钮返回的话没有问题。

开放的不完善、不够用啊、、跪求公开

希望添加公开项:1.二级标题的公开设置:能够自己自定义背景、高度、和下拉图片,下拉图标需要有点击事件。也能够自定义下拉图片的位置和图片。
2.一般下来箭头点击需要下拉一个view 做二级标题的编辑处理。希望考虑周全方便我们使用。。先在此谢过Jack大神了!

返回内容页首页出现Crash

从第四页之后(包括第四页)快速返回到首页,不会出现Crash,但是从第四页之前(例如第二页)返回到首页会出现Crash。错误返回:-[UITableView pageDidAppear]: unrecognized selector sent to instance 0x14a62200

untitled

一些改进的意见

1:可控制左右两边侧滑的偏移量
2:集成下拉刷新
3:可控制侧滑后主页面右侧阴影是否显示
4:二级栏目左右侧阴影图片设置出错,必须使用Leftshadow和rightShadow
5:可控制侧滑后主页面是否能跟随重力进行偏移
6:划出菜单后,手势触发范围需要缩小到主页面上,左侧菜单和右侧菜单不触发手势较好

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.