Я поставил DragView (подкласс UIView) на UITableViewCell с тегом (строка + 20000)что максимальное ограничение просмотра тега на UITableViewCell
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSInteger row=[indexPath row];
NSInteger section=[indexPath section];
static NSString *SimpleTableIdentifier1 = @"CellTableIdentifier";
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier: SimpleTableIdentifier1 ];
if (cell == nil) {
cell=[[[UITableViewCell alloc] initWithFrame:CGRectZero
CGRect dragRect =CGRectMake(12.0f,6.0f,24.0f,24.0f);
DragView *dragger =[[DragView alloc] initWithFrame:dragRect];
[dragger setTag: row+20000 ];
}
DragView *newDragger=(DragView*)[cell viewWithTag: row+20000 ];//error
//......
return cell;
}
Но когда я пытаюсь использовать коды (строки метки с «ошибкой») для доступа к DragView, отладчик показывает, что newDragger возвращает 0x0, что означает отсутствие объекта.
Я не знаю, где не так. Я просто думаю, что может быть причина ограничения суммы максимической метки)
Приветствую любой комментарий.
Благодаря
InterDev