如何使UIImageView在设置动画时超过/高于其他子视图/UIImageView?请检查图片中的白大王
UIView.animateWithDuration(3, animations:{
self.squares[moveInfo.start.0][moveInfo.start.1].occupyingPieceImageView.frame =
self.squares[moveInfo.end.0][moveInfo.end.1].frame
}
最佳答案
UIView.animateWithDuration(3, animations:{
self.view.bringSubViewToFront(self.squares[moveInfo.start.0][moveInfo.start.1].occupyingPieceImageView)
self.squares[moveInfo.start.0][moveInfo.start.1].occupyingPieceImageView.frame =
self.squares[moveInfo.end.0][moveInfo.end.1].frame
}
关于ios - 动画时将UIImageView放在最前面,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36804923/