2

我想在我的单元格中移动 EditingAccessoryView 的位置。我尝试了以下但没有成功:

UIActivityIndicatorView activityIndicator = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.Gray);
activityIndicator.Frame.X = 227f;
cell.EditingAccessoryView = activityIndicator;

我在 GetCell 方法中这样做。

任何想法将不胜感激。

谢谢,瑞克

4

1 回答 1

0

关于什么 ?

cell.editingAccessoryView.frame = CGRectMake(0, 0, 40, 40);

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

解释:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *cellIdentifier = @"cellIdentifier";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];

    if(cell == nil) {
        cell =  [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier];
        cell.editingAccessoryView.frame = CGRectMake(0, 0, 40, 40);
     }
return cell;
}
于 2013-02-05T09:35:00.150 回答