1、设置tableview返回时取消选中状态- (void)viewWillAppear:(BOOL)animated{ [superviewWillAppear:animated]; [self.tableviewdeselectRowAtIndexPath:self.tableview.in.....
分类:
其他好文 时间:
2014-07-10 13:55:33
阅读次数:
197
代码来源 cocoachina推荐源码 26日上面这些是一些基本的设置,然后提前补充几个知识点!类后面的!作用是强制类型转换NSCoder是一个抽象类,是字节流的抽象类,我们可以把数据写入一个coder也可以从coder中读出数据!as也可以类型为类型转换Swift中sort函数有两种用法,在编译器...
分类:
其他好文 时间:
2014-07-10 11:11:05
阅读次数:
387
iOS开发多线程篇—自定义NSOperation一、实现一个简单的tableView显示效果实现效果展示:代码示例(使用以前在主控制器中进行业务处理的方式)1.新建一个项目,让控制器继承自UITableViewController。 1 // 2 // YYViewController.h 3 /....
分类:
移动开发 时间:
2014-06-27 22:43:29
阅读次数:
466
iOS 两个tableview的 瀑布流1. [代码]Objective-C //// DocViewController.m// getrightbutton//// Created by 隋文涛 on 12-12-9.// Copyright (c) 2012年 隋文涛. All rights....
分类:
移动开发 时间:
2014-06-27 11:25:19
阅读次数:
365
实现Cell的滑动删除, 需要实现UITableView的代理UITableViewDelegate中如下方法://先要设Cell可编辑- (BOOL)tableView:(UITableView*)tableView canEditRowAtIndexPath:(NSIndexPath*)inde...
分类:
移动开发 时间:
2014-06-26 17:53:38
阅读次数:
148
完成Swift的语法关之后,来点实际的Task,第一个任务是写一个tableview,使用cocoaTouch里tableview这个常用的控件。
创建工程,选择Swift语言
首先是用Obejctive-C写的最简单的tableview
点击下载源码
然后是Swift写的tableview
点击下载源码...
分类:
其他好文 时间:
2014-06-26 08:17:56
阅读次数:
225
创建UITableViewController子类的实例后,IDE生成的代码中有例如以下段落:[cpp]view plaincopy-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPa...
分类:
移动开发 时间:
2014-06-25 15:35:10
阅读次数:
247
#defineDARK_BACKGROUND[UIColorcolorWithRed:151.0/255.0green:152.0/255.0blue:155.0/255.0alpha:1.0];-(void)tableView:(UITableView*)tableViewwillDisplayCell:(UITableViewCell*)cellforRowAtIndexPath:(NSIndexPath*)indexPath{cell.backgroundColor=DARK_BACKGROUND;}
分类:
其他好文 时间:
2014-06-25 10:48:56
阅读次数:
264
iOS Dev (63) 如何在 TableView 滚动时收起键盘?
作者:阿锐地址:http://blog.csdn.net/prevention
-
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
[_inputTextView resignFirstResponder];
}
-
转载请注明来自:ht...
分类:
移动开发 时间:
2014-06-25 10:07:33
阅读次数:
264
NSIndexPath *messageIndexPath = [NSIndexPath indexPathForRow:afterRowCount-1 inSection:0];
[self.tableView beginUpdates];
[self.tableView insertRowsAtIndexPaths:@[messageIndexPath] withRowAnim...
分类:
其他好文 时间:
2014-06-25 09:59:01
阅读次数:
191