2011-07-01 3 views
2

私は立ち往生しています。私はメッセージを持つTableViewを持っています。選択すると、これらは削除され、ごみ箱に移動されます。私は、controller:didChangeContent [...] case NSFetchedResultsChangeDeleteでそれを使用することで、実際のジーン効果を簡単に得ることができますが、他のセルのの後ろにanim30ies があります。しかし、私はそれを他の細胞の上にの上にします。私は間違って何をしていますか?ここでジーティー効果でアニメーションUITableViewCell

は、アニメーションのコードです:

[UIView beginAnimations:@"suck" context:NULL]; 
[UIView setAnimationTransition:103 forView:myCell cache:YES]; 
[UIView setAnimationDuration:0.5]; 
[UIView setAnimationPosition:CGPointMake(50, 710)]; 
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; 
[UIView commitAnimations]; 

hereからアイデアを得ました。

+0

これらはプライベートAPIですので、Appleはあなたのアプリを拒否するかもしれません。 –

答えて

0

あなたはこれを行うことにより、フロントにあなたのセルを持ってみてください:

[myCell.superview bringSubviewToFront:myCell] 
+0

それはそのトリックをしなかった。 :(以前と同じですが、とにかくThx。 – soelu

0

あなたはViewController.mファイルでは、このlink

からソースコードを取得することができ、以下の変更

- (void) genieToRect: (CGRect)rect edge: (BCRectEdge) edge 
{  
NSTimeInterval duration = self.durationSlider.value; 

CGRect endRect = CGRectInset(rect, 5.0, 5.0); 

[self.buttons enumerateObjectsUsingBlock:^(UIButton *button, NSUInteger idx, BOOL *stop)  { 
    button.enabled = NO; 
}]; 

if (self.viewIsIn) { 
    [self.draggedView genieOutTransitionWithDuration:duration startRect:endRect startEdge:edge completion:^{ 
     self.draggedView.userInteractionEnabled = YES; 
     [self.buttons enumerateObjectsUsingBlock:^(UIButton *button, NSUInteger idx, BOOL *stop) { 
      button.enabled = YES; 
     }]; 
    }]; 
} else { 
    self.draggedView.userInteractionEnabled = NO; 
    [self.draggedView genieInTransitionWithDuration:duration destinationRect:endRect destinationEdge:edge completion: 
    ^{ 
     [self.buttons enumerateObjectsUsingBlock:^(UIButton *button, NSUInteger idx, BOOL *stop) { 
      button.enabled = YES; 
     }];}]; 
} 

self.viewIsIn = ! self.viewIsIn; 
} 
を行います

希望します..ハッピーコーディング!!!

関連する問題