我想同时对 10 个 UI 对象(其中大部分是 UIImageView)应用同样的效果。这是动画:
[UIView animateWithDuration:0.7f
animations:^{
woodenBackground1.frame = CGRectMake(self.woodenBackground1.frame.origin.x - 900,self.woodenBackground1.frame.origin.y, self.woodenBackground1.frame.size.width, self.woodenBackground1.frame.size.height);
woodenBackground.frame = CGRectMake(self.woodenBackground1.frame.origin.x - 900,self.woodenBackground2.frame.origin.y, self.woodenBackground1.frame.size.width, self.woodenBackground2.frame.size.height);
......
有没有办法做到这一点?我怎样才能为那么多对象重复它而不是重复代码本身?