【发布时间】:2011-12-17 22:55:34
【问题描述】:
可能重复:
create multiple variables based on an int count
Objective C Equivalent of PHP's “Variable Variables”
如何使用变量作为名称来创建和引用对象?
例子-
for (int i=1; i<7; i++) {
CGRect ("myRectNum & i") = myImageView.bounds;
}
("myRectNum & 5").height etc ..
【问题讨论】:
标签: iphone objective-c ios xcode