She*_*lam 20 iphone cocoa-touch objective-c uitableview
我有一个可以编辑的UITableView.我正在显示单元格:
- (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.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
// Configure the cell...
STWatchList *mySTWatchList;
mySTWatchList = [items objectAtIndex:indexPath.row];
cell.textLabel.text = mySTWatchList.watchListName;
return cell;
}
Run Code Online (Sandbox Code Playgroud)
当用户正在编辑时,我想显示披露指标.我怎么能做到这一点?
Vla*_*mir 55
cell.editingAccessoryType = UITableViewCellAccessoryDisclosureIndicator;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11044 次 |
| 最近记录: |