• 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


  • 相关阅读:
    Oracle笔记(三) Scott用户的表结构
    Oracle笔记(一) Oracle简介及安装
    Oracle笔记(七) 数据更新、事务处理、数据伪列
    Oracle笔记(六) 多表查询
    Oracle笔记(九) 表的创建及管理
    Oracle笔记(四) 简单查询、限定查询、数据的排序
    CentOS 6.3下部署LVS(NAT)+keepalived实现高性能高可用负载均衡
    PostgreSQL学习手册(十七) PL/pgSQL过程语言
    Oracle笔记(八) 复杂查询及总结
    Oracle笔记(十二) 集合、序列
  • 原文地址:https://www.cnblogs.com/ioriwellings/p/2838672.html
Copyright © 2020-2023  润新知