Мне нужно переместить мою ячейку UITableView
из ее tableview
, но когда я пытаюсь переместить UITableViewCell
, тогда она всегда находится в пределах ее tableview
, и мне нужно анимация при перемещении.Как переместить ячейку UITableView в другой вид вне UITableView?
Это мой код:
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
//config for HomeTableView
[HomeTableView setEditing:YES animated:YES];
[HomeTableView setScrollEnabled:YES];
[HomeTableView setAllowsSelection:YES];
[HomeTableView setAllowsSelectionDuringEditing:YES];
}
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath {
//i just change data source of my tableview at here
[self showViewGarbageAnimationMoveCell];//show custom view like garbage
//i want During when i move my cell if it is within bound of custom view -> it will be smaller scaled and be deleted when i end move on this cell.
//Unfortunately i can't move my cell to out of its tableview
}
-(void)showViewGarbageAnimationMoveCell
{
UIView * testView = [[UIView alloc] initWithFrame:CGRectMake(5.0f, 10.0f, 375.0f, 50.0f)];
[testView setBackgroundColor:[UIColor blueColor]];
[self.view addSubview:testView];
[UIView animateWithDuration:0.3f
delay:0.0f
options:UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse
animations:^{
[testView setFrame:CGRectMake(10.0f, 10.0f, 375.0f, 50.0f)];
}
completion:nil];
}
вы должны объяснить, что вы хотите сделать более подробно. – Loxx
Это хороший вопрос. что ты уже испробовал? – soulshined
Я не думаю, что это возможно. Что ты пытаешься сделать? – Tander