Json数据需要定义jsonReader来跟服务器端返回的数据做对应,其默认值:·jsonReader:{·root:"rows",·page:"page",·total:"total",·records:"records",·repeatitems:true,·cell:"cell",·id:"i...
分类:
Web程序 时间:
2014-07-22 22:56:54
阅读次数:
213
UITableView 总结 ? UITableView是UIScrollView的子类,因此它可以自动响应滚动事件(一般为上下滚动)。 它内部包含0到多个UITableViewCell对象,每个table cell展示各自的内容。当新cell需要被显示时,就会调用...
分类:
其他好文 时间:
2014-07-21 10:25:45
阅读次数:
250
1.文件结构:2.先创建一个xib文件,删除原有的view,添加一个TableViewCell控件。3.ModelTableViewController.m文件 1 #import "ModelTableViewController.h" 2 #import "Cell.h" 3 4 5 @in.....
分类:
其他好文 时间:
2014-07-19 19:31:48
阅读次数:
169
iOS开发项目篇—41cell的frame设计一、简单说明1.分层设计在进行设计的时候,建议先分析整个cell的结构,确定了cell由哪些模块构成之后,再进一步确定每个模块中包含的子控件。在这个微博的cell中,把这个cell分成两个大的模块。分解结构如下:1.微博完整内容模块View(1)原创微博...
分类:
移动开发 时间:
2014-07-19 15:07:32
阅读次数:
343
UVA 11774 - Doom's Day
题目链接
题意:给定一个3^n*3^m的矩阵,要求每次按行优先取出,按列优先放回,问几次能回复原状
思路:没想到怎么推理,找规律答案是(n + m) / gcd(n, m),在topcoder上看到一个证明,如下:
We can associate at each cell a base 3-number, the log3(R...
分类:
其他好文 时间:
2014-07-19 14:06:19
阅读次数:
220
使用xib自定义cell的时候,需要在xib中指定复用identifier(通常与类名一致即可),在编码的时候,也应该使用该identifier而不应该自定义其他identifier,否则,可能导致程序崩溃或者其他莫名其妙的异常。假设有两个UITableViewCell:TestACell,Test...
分类:
其他好文 时间:
2014-07-18 19:14:56
阅读次数:
211
Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace...
分类:
其他好文 时间:
2014-07-18 17:21:54
阅读次数:
293
一 Words and phrazes1 taboo禁忌n ,禁止v e.g. In the main主要,基本上,children are taboo in the workplace.2 unpolite 无礼的3 erosion 侵蚀n e.g. This leaves fertile soi...
分类:
其他好文 时间:
2014-07-18 15:35:54
阅读次数:
317
iOS开发项目篇—40搭建cell的基本结构一、简单说明1.策略:针对微博可能出现的多种情况(只有文字,有文字有配图,有转发微博等),一次性加载所用的子控件到cell中,对于没有数据的空间进行隐藏。(不管cell以后会显示什么子控件,把所有有可能显示的子控件都添加上去·添加到contentView上...
分类:
移动开发 时间:
2014-07-18 09:38:39
阅读次数:
421
文件结构:一:先定义cell,这里是Cell类,继承自UICollectionViewCell,用xib画出cellCollectionCell.h1 #import 2 3 @interface CollectionCell : UICollectionViewCell4 5 @endCollec...
分类:
其他好文 时间:
2014-07-16 15:49:37
阅读次数:
355