Please remove your implementation of this method and set the cell properties accessoryType and/or e
2013-12-08 20:32
357 查看
因为accessoryTypeForRowWithIndexPath函数已经不建议使用了,要替换成:
// Customize the appearance of table view cells.
- (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] autorelease];
cell.showsReorderControl=YES;
cell.accessoryType=UITableViewCellAccessoryDetailDisclosureButton;
}
NSUInteger row=[indexPath row];
cell.textLabel.text=[dataItems objectAtIndex:row];
return cell;
}
同时删除tableView:accessoryTypeForRowWithIndexPath函数。这个问题不是编辑TableView时出现的,在前面写的编写简单的导航控制器中就开始有这个问题。
// Customize the appearance of table view cells.
- (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] autorelease];
cell.showsReorderControl=YES;
cell.accessoryType=UITableViewCellAccessoryDetailDisclosureButton;
}
NSUInteger row=[indexPath row];
cell.textLabel.text=[dataItems objectAtIndex:row];
return cell;
}
同时删除tableView:accessoryTypeForRowWithIndexPath函数。这个问题不是编辑TableView时出现的,在前面写的编写简单的导航控制器中就开始有这个问题。
相关文章推荐
- linux下安装PHP的CI框架,出现Your view folder path does not appear to be set correctly. Please open the following file and correct this: i
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- This version of the rendering library is more recent than your version of ADT plug-in. Please update
- Javascript Object Method Properties console.log View all methods and properties of the object
- This version of the rendering library is more recent than your version of ADT plug-in. Please updat
- ReactJs 报错 Element type is invalid: expected a string (from built-in components) or a class/function (for composite components) but got: undefined. Check the render method of `Me`.
- ArcGIS Engine中初始化许可常见问题归纳,the application is not licensed to create or modify schema for this type of data
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- This version of the rendering library is more recent than your version of ADT plug-in. Please update
- Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this scrip
- One or more breakpoints cannot be set and have been disabled.Execution will stop at the beginning of the program
- This version of the rendering library is more recent than your version of ADT plug-in. Please update
- One or more breakpoints cannot be set and have been disable.Execution will stop at the begining of the programe
- This version of the rendering library is more recent than your version of ADT plug-in. Please update
- This version of the rendering library is more recent than your version of ADT plug-in. Please update
- This EntitySet of Type 'Data.Tbl_Student' does not support the 'Add' operation.原因
- This version of the rendering library is more recent than your version of ADT plug-in. Please update
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in问题
- The difference of typeof and GetType method