zoukankan      html  css  js  c++  java
  • Three20 不及格的程序员

    Three20框架好久不用了,而且也已经过时了,不过它在当时来讲确认解决了许多麻烦,省确了许多代码,仅此环念。

    最近用xcode4.2打开老项目后发现,不能编译,解决掉那些被警告的过时api后又发现 “Empty TTTableViewHeaders displaying although they shouldn't!”,因为苹果在ios5这后表格行为发生了变化。

    不过最为有趣的是我使用xcode3.2编译到我的ios5真机中,显示是正确的,而用xcode4.2编译就会出现empty head.

    tableView:heightForHeaderInSection: 

    Special Considerations

    Prior to iOS 5.0, table views would automatically resize the heights of headers to 0 for sections where tableView:viewForHeaderInSection: returned a nil view. In iOS 5.0 and later, you must return the actual height for each section header in this method.


    YourViewController ---------> TTableViewController<UITableViewDataSource> ----------> TTModelViewController

                                                  |                                                                                                  |

                                 dataSource:TTListDataSource                                                            model<TTModel>

                                                  |                                                                                             ^

                                              model --------------------------------------------------------------------------^


    yourDataSource 视图在将要显示时会请求网络获取所需数据,加载中如果缓存中有直接显示,否则通过下载完成回调重新执行表格reload加载数据.

    //fecth data from yourModel then put it to sefl.item that property of TTListDataSource, eg TTTableMoreButton item.

    - (void)tableViewDidLoadModel:(UITableView*)tableView


    YourModel 

    //请求json

    - (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more

    //将json转化成实体

    - (void)requestDidFinishLoad:(TTURLRequest*)request


  • 相关阅读:
    python 序列的方法
    python函数基础
    Flume入门:安装、部署
    Flume日志收集系统介绍
    Python 列表(List)操作方法详解
    在linux下新增一块硬盘的操作。(包含大于2T的硬盘在linux下挂载操作)
    python字符串操作大全
    Python中的迭代器漫谈
    Linux 常用快捷键
    ssh采用expect实现自动输入密码登录、拷贝
  • 原文地址:https://www.cnblogs.com/ioriwellings/p/2838672.html
Copyright © 2011-2022 走看看