tableView中的一些问题-新手必看
来源:互联网 发布:淘宝网与阿里巴巴 编辑:程序博客网 时间:2024/05/17 22:54
错过了就可惜把~!!
1. 不要在tableView的方法中创建属性,tableView的方法每次都走,下一个会覆盖上一个的效果
2 .tableView索引cell 的坐标方法
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
NSLog(@"section = %ld, row = %ld", (long)indexPath.section , (long)indexPath.row);
CGRect popoverRect = [tableView convertRect:[tableView rectForRowAtIndexPath:indexPath] toView:[tableView superview]];
NSLog(@"%f",popoverRect.origin.y);
}
3.//分割线充满
_tableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0); //取消cell的分割线
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
4.sugue 传值
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{if ([segue.identifier isEqualToString:@"search"]) {
ShowTopicsViewController * showVC = [segue destinationViewController];
NSLog(@"sdadasd = %@",[segue destinationViewController]);
showVC.aField = self.topTopicLabel.text;
}
if ([segue.identifier isEqualToString:@"gotoWeb"]) {
WebViewController * webVC = (WebViewController *)((UINavigationController *)[segue destinationViewController]).topViewController;
webVC.urlStr = _linkWebUrl;
//NSLog(@" ... = %@", webVC.urlStr);
}
}
5//根据storyboard 标识索引 vc (没有连线)
self.detailVC = [self.storyboard instantiateViewControllerWithIdentifier:@"detailVC"]; 0 0
- tableView中的一些问题-新手必看
- 新手必看(转)
- 新手必看
- 新手必看
- Ajax新手必看
- PHP新手必看
- 一些成功人士的心得(新手必看)
- 一些web前端相关网址收藏(新手必看)
- 新手必看网站建设中的三个秘诀
- ACM过程中的提交结果(新手必看!)
- 友情链接交换注意问题 seo新手必看
- 通讯录编译过程遇到的经典问题,新手必看
- swift中常量,变量相关问题(新手必看)
- Java FAQ(新手必看)
- Java FAQ(新手必看)
- Java FAQ(新手必看)
- Java FAQ(新手必看)
- Java FAQ(新手必看)
- Android Launcher分析和修改2——Icon修改、界面布局调整、壁纸设置
- C 语言 函数之realloc
- DHT网络
- iOS开发剪贴板
- Mongodb语法总结
- tableView中的一些问题-新手必看
- Android相机、相册获取图片,解决相机拍照图片被压缩模糊的情况
- linux 网络编程【四】 非阻塞通信poll
- 杂谈总结
- 等额本金和等额本息的区别(含计算公式)
- zookeeper超时--minSessionTimeout与maxSessionTimeout
- 大话重构连载1:遗留系统——软件工业时代的痛
- 常用正则表达式(收藏整理)
- Android系统启动过程