摘要: -、建立UITableViewDataTable=[[UITableViewalloc]initWithFrame:CGRectMake(0,0,320,420)];[DataTablesetDelegate:self];[DataTablesetDataSource:self];[self.viewaddSubview:DataTable];[DataTablerelease];二、UITableView各Method说明//添加索引-(NSArray*)sectionIndexTitlesForTableView:(UITableView*)tableView{returnTitleDat 阅读全文
posted @ 2013-07-11 23:44 天牛 阅读(1793) 评论(0) 推荐(1)
摘要: 我们在做UITableView的修改,删除,选择时,需要对UITableView进行一系列的动作操作。这样,我们就会用到[tableViewbeginUpdates];if(newCount<=0) {[tableViewdeleteSections:[NSIndexSetindexSetWithIndex:indexPath.section]withRowAnimation:UITableViewRowAnimationLeft];}[tableViewdeleteRowsAtIndexPaths:[NSArrayarrayWithObject:indexPath]withRowAni 阅读全文
posted @ 2013-07-11 18:55 天牛 阅读(699) 评论(0) 推荐(0)
摘要: 由于项目需要,做一个UITableView来实现删除功能。效果如图:功能思路其实不难:交代一下,我自己要实现的效果:1.TableView是分组的。2.点击删除按钮后,某行被删除。写完,大概功能,运行:出现:*** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-2372/UITableView.m:1070libc++abi.dylib: handler threw exception原因:1.在调用deleteRowsAtIndexPaths:方 阅读全文
posted @ 2013-07-11 18:53 天牛 阅读(411) 评论(0) 推荐(0)
摘要: XCODE编译运行项目后,发现工程编译后无法运行,出现:"The selected destination does not support the architecture for which the selected software is built. Switch to a destination that supports that architecture in order to run the selected software." 错误。首先,出现该问题一般是在${PROJECT_NAME}.xcodeproj目录的相关文件的问题,像xcschemes/xc 阅读全文
posted @ 2013-07-11 14:02 天牛 阅读(443) 评论(0) 推荐(0)
摘要: 一、Foundation framework中用于收集cocoa对象(NSObject对象)的三种集合分别是:NSArray用于对象有序集合(数组)NSSet用于对象无序集合(集合)NSDictionary用于键值映射(字典)以上三种集合类是不可变的(一旦初始化后,就不能改变)以下是对应的三种可变集合类(这三种可变集合类是对应上面三种集合类的子类):NSMutableArrayNSMutableSetNSMutableDictionary注:这些集合类只能收集cocoa对象(NSOjbect对象),如果想保存一些原始的C数据(例如,int, float, double, BOOL等),则需要将 阅读全文
posted @ 2013-07-11 11:41 天牛 阅读(281) 评论(0) 推荐(0)