草庐IT

storedCells

全部标签

closures - animateWithDuration:animations:completion: 在 Swift 中

在objective-C中,我的动画片段看起来像这样:[UIViewanimateWithDuration:0.5animations:^{[[[_storedCellslastObject]topLayerView]setFrame:CGRectMake(0,0,swipeableCell.bounds.size.width,swipeableCell.bounds.size.height)];}completion:^(BOOLfinished){[_storedCellsremoveLastObject];}];如果我把它翻译成Swift,它应该看起来像这样:UIView.ani

closures - animateWithDuration:animations:completion: 在 Swift 中

在objective-C中,我的动画片段看起来像这样:[UIViewanimateWithDuration:0.5animations:^{[[[_storedCellslastObject]topLayerView]setFrame:CGRectMake(0,0,swipeableCell.bounds.size.width,swipeableCell.bounds.size.height)];}completion:^(BOOLfinished){[_storedCellsremoveLastObject];}];如果我把它翻译成Swift,它应该看起来像这样:UIView.ani