I have this problem adding an object to NSSet...
我有这个问题,向NSSet添加一个对象...
The NSMutableSet *set "belongs" to main ViewController. I want to add an object (Wall) to this NSMutableSet automatically if I add it to view in interface builder... Wall is a subclass of UIImageView...
NSMutableSet *设置为“属于”主ViewController。如果我将它添加到界面构建器中的视图中,我想自动向该NSMutableSet添加一个对象(Wall)... Wall是UIImageView的子类...
Thanks :)
谢谢 :)
1 个解决方案
#1
0
found a way how to do it :)
找到了办法怎么做:)
for(UIView *v in self.view.subviews) { if([v isKindOfClass:[Wall class]]) [obstacleSet addObject:v]; }
for(UIView * v in self.view.subviews){if([v isKindOfClass:[Wall class]])[obstacleSet addObject:v]; }
#1
0
found a way how to do it :)
找到了办法怎么做:)
for(UIView *v in self.view.subviews) { if([v isKindOfClass:[Wall class]]) [obstacleSet addObject:v]; }
for(UIView * v in self.view.subviews){if([v isKindOfClass:[Wall class]])[obstacleSet addObject:v]; }