- 浏览: 611106 次
文章分类
最新评论
-
q781253433:
qin ~.求demo看看~
Android之Widget -
zhongyuanceshi:
博主,没看到你的例子的Demo,共享下
Android之Widget
选中某一行后想要tableView自动滚动使得选中行始终处于table的top、middle或者bottom,使用以下方法中的一个就可以实现:
[tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES];
// [tableView scrollToNearestSelectedRowAtScrollPosition:UITableViewScrollPositionBottom animated:YES];
h文件:
@interface GKViewController : UIViewController <UITableViewDataSource,UITableViewDelegate>{ BOOL bCheck[50]; }
m文件:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 50; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (bCheck[indexPath.row]) { return 100; }else{ return 50; } // return 50; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if(cell == nil) { cell= [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator; } cell.textLabel.text=[NSString stringWithFormat:@"%@%i",@"话题",indexPath.row]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self initCheck]; bCheck[indexPath.row] = YES; [tableView reloadData]; bCheck[indexPath.row] = NO; [tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES]; // [tableView scrollToNearestSelectedRowAtScrollPosition:UITableViewScrollPositionBottom animated:YES]; }
发表评论
-
tableview FPS 优化
2016-06-28 11:26 1现状: 在滚动tableview ... -
iOS 开发者中的公司账号与个人账号之间有什么区别?
2016-06-23 14:54 460原文:http://www.zhihu.com/questio ... -
strong weak copy
2016-04-24 21:01 591copy的使用 如果是mutable,则co ... -
App性能优化思考
2015-10-13 15:24 869一个app的数据 启动时间 crash率 每个 ... -
iOS之手势操作
2015-01-19 10:24 745手势学习: https://developer. ... -
iOS之网络学习
2015-01-19 10:23 609网络学习: http://nshipster.c ... -
nib文件的加载过程
2014-10-24 13:39 724参考:http://blog.csdn.net/nokiax ... -
NSCoder&&NSCoding使用
2014-10-24 11:38 730NScoder和NScoding的作用是将自定义的类的对象持 ... -
Autolayout学习
2014-10-20 16:32 696参考: http://my.oschina. ... -
IOS开发屏幕适配总结
2014-10-20 16:28 411面对4个分辨率的iPhone,建议使用Auto Layou ... -
Size Classes学习
2014-10-20 16:27 723Size Classes介绍:http://blog.su ... -
iPhone6分辨率以及适配
2014-10-20 11:36 1272对iPhone6适配的两种方式:1、兼容模式 这种模式 ... -
Core Animation简介
2014-10-19 15:33 744在iOS中,整个view都是直接构建在Core Animat ... -
Charles使用——HTTP代理服务器
2014-10-19 15:32 2000* HTTP代理服务器,监听8888端口 * HTTP监视 ... -
《精选》开发中遇到的问题总结
2014-10-19 15:31 9731、新浪微博的使用 使用的事umeng的SDK来调用微信、 ... -
使用JavaScript给UIWebView中的内容注入CSS
2014-10-06 21:26 1110NSString *filePath = [[NSB ... -
UIViewde的属性edgesForExtendedLayout
2014-09-26 17:56 657edgesForExtendedLayout 指定边缘 ... -
UIView的属性autoresizingMask
2014-09-26 17:36 726在 UIView 中有一个autoresizingMask ... -
UIWebView获取内容的高度
2014-09-24 13:13 705// 第一种方法 ... -
storyboard的总结
2014-09-02 11:30 690两个基本概念 scene 就是一个视图控制器 se ...
相关推荐
UITableView——reloadData与reloadSection性能较周五上午,测试,有bug:每次reset模拟器后,第次进界,闪退,第次进界,结果
iOS基础——通过案例学知识之UITableView
安卓Android源码——UITableView ios风格控件.rar
由于数据比较多,在每行中需要显示多列数据,所以继需要用到纵向滚动,又要用到横向滚动。所以我就向UIScrollView中添加UITableView,因为根视图控制器是UINavigationController
iOS UITableView获取特定位置的cell
安卓Android源码——UITableView ios风格控件.zip
UITableView、UITableView基本用法、UITableView详解,UITabelView常用方法
SplittableViewKit - 当设备旋转时,UITableView中的IndexPath单元格将自动移动到左视图
UItableview cell (自定义)增假,删除 移动
UITableViewDropDown 点击cell展开另外一个UITableView
长按即可移动cell的UITableView
主要介绍了IOS中UITableView滚动到指定位置的实现方法,本文介绍的非常详细,具有参考借鉴价值,需要的朋友可以参考下
UITableView通过重用单元格来达到节省内存的目的:通过为每个单元格指定一个重用标识符 reuseIdentifier 即指定了单元格的种类 以及当单元格滚出屏幕时 允许恢复单元格以便重用 对于不同种类的单元格使用不同的ID ...
UITableView的cell移动位置,下次进入界面后是拖动后的界面
UITableView相关操作
IOS UITableView click
(1)UITableView用来显示表格的可见部分,UITableViewCell用来显示表格的一行。 (2)UITableView并不负责存储表格中的数据,而是仅仅存储足够的数据使得可以画出当前可见部分。 (3)UITableView从...
iOS基础——通过案例学知识之UITableView(上)
iOS基础——通过案例学知识之UITableView(中)