在 class 內有 member datas 以數字結尾,
eq.
UIImageView* imageView1;
UIImageView* imageView2;
UIImageView* imageView3;
想利用 @"imageView%d" 之類的方始來存取?
參考了 Key-Value Coding Programming Guide (看不是很了解@@)
不過可以這樣用:
for(int i=1;i<=3;i++){
[self valueForKey:@"imageView%d"];
...
}
沒有留言:
張貼留言