Changes between Version 26 and Version 27 of entity
- Timestamp:
- 01/04/2012 11:17:53 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
entity
v26 v27 65 65 } 66 66 }}} 67 68 69 === 构造网格视图 === 70 71 本应用所有网格都是规则的,因此可以使用3.0框架里的PCButtonCell视图,该视图允许开发者在上面添加若干个图片按钮,我们使用普通的列表就可以构造出一个网格视图。因为未必每个网格的样式都相同,比如说显示的文本、图标和位置不一样,所以基本PCButtonCell只包含一个PCButton。需要使用额外的视图构件比如UILabel或者UIImageView的,可以继承PCButtonCell然后自定义更加丰富的网格。假设每一行显示n个网格,下面是基本的使用方法: 72 73 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 74 75 return [dataSource count] / n + 1; 76 } 77 78 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 79 80 } 81 82 67 83 本地项目(LocalItem)://用于抽象用户保存在本地的图片和图集,也就是说一个LocalItem可以是图片,也可以是图集 68 84
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)