码迷,mamicode.com
首页 >  
搜索关键字:tableview    ( 2243个结果
UItableview
初学者的问题主要集中在,下面几个问题:一、几个函数总是不被调用:例如:- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;这个代理不被调用的种类很多:1. section的c...
分类:其他好文   时间:2014-10-27 19:20:30    阅读次数:201
iOS中tableview中headerview总保持在屏幕上方和随着屏幕滑动一起移动至消失
1 : tableview中headerview总保持在屏幕上方 :  在代理方法中创建view,并添加到headerview上 l例子: - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {     if ([self.title isEqualToString...
分类:移动开发   时间:2014-10-27 17:46:17    阅读次数:427
tableview小结
初学者的问题主要集中在,下面几个问题: 一、几个函数总是不被调用:例如: - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section; 这个代理不被调用的种类很多: 1. section的count没有正确 2. 没有设置代理 3.如果没有设置seciton的高度,仍然...
分类:其他好文   时间:2014-10-27 14:25:20    阅读次数:120
如何取消TableViewCell的选中状态
在UITableView里面,选择了某一个cell以后,点击立刻取消该cell的选中状态,可以使用如下方法:- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ //s...
分类:其他好文   时间:2014-10-26 11:32:06    阅读次数:186
添加索引(IOS开发)
索引是用来辅助查询。 原则: - 索引标题不能与显示的标题完全一样; - 索引应该具有一定的代表性,能够代表一个数据集合; - 如果采用了索引列表视图,一般情况下就不再使用扩展视图。(容易点到) 会重新到的数据源方法: tableView: numberOfRowsInSection: ------获取某节的行数 tableView:cellForRowAtIndexPath: --...
分类:移动开发   时间:2014-10-25 21:31:53    阅读次数:241
TabviewCell的多分区实现
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{//返回两个分区 return 2;}-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSect....
分类:其他好文   时间:2014-10-24 20:33:09    阅读次数:142
多视图控制器 (一个界面需要多个tableview CollectionView时)
storyboard上创建多个viewcontroller在miancontroller上添加viewcontroller的跟视图-(void)viewDidLoad{[superviewDidLoad];self.navigationController.navigationBar.translucent=NO;//createandaddourtwochildrenviewcontrollersfromourstoryboardself.child1=[self.storyboa..
分类:其他好文   时间:2014-10-24 16:45:51    阅读次数:123
自定义单元格(IOS)
自定义单元格有三种方法 - 代码实现 - xib - storyboard(推荐) 在故事板中操作方法为 1、在TableView属性的Prototype Cells设置为1,默认为1; 2、需要创建自定义的单元格类; 3、设定Table View Cell的Class为自定义类; 自定义类:(并不难) #import "CustomCell.h" @implement...
分类:移动开发   时间:2014-10-24 14:37:05    阅读次数:176
UITableView (4): 在TableView中移动cell和Section 从TableView中删除cell和section
一 .问题:你想用流畅直观的动画来移动和拖拽TableView中的cell和section方案: 用moveSection:toSection:方法把一个Section移动到新位置. 用moveRowAtIndexPath:toIndexPath:方法把一个cell从当前位置移动到新位置例子: .....
分类:移动开发   时间:2014-10-24 12:56:08    阅读次数:262
利用StoryBoard编写UITabelViewCell
举一个炒鸡简单的例子:1 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{2 NSString *cellIdentifier = @...
分类:其他好文   时间:2014-10-23 20:29:16    阅读次数:189
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!