草庐IT

tiledViewsStack

全部标签

ios - "Cannot assign to property: "任何 "is immutable"错误

tiledViewsStack包含UIImageViews。我试图给数组中的每个UIImageView一个新的中心坐标。不知道为什么我在for循环的最后一行收到此错误...vartiledViewsStack=[AnyObject]()varrandLocInt=Int()varrandLoc=CGPoint()forvaranyintiledViewsStack{randLocInt=Int((arc4random()*10)%9)//0,---8randLoc=allCenters[randLocInt].CGPointValue()any.center=randLoc}