开发者

Adding object to an NSMutableSet automatically when it's initiated... (iphone)

开发者 https://www.devze.com 2022-12-24 08:35 出处:网络
I have this problem adding an object to NSSet... The NSM开发者_Go百科utableSet *set \"belongs\" to main ViewController.

I have this problem adding an object to NSSet...

The NSM开发者_Go百科utableSet *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...

Thanks :)


found a way how to do it :)

for(UIView *v in self.view.subviews) { if([v isKindOfClass:[Wall class]]) [obstacleSet addObject:v]; }

0

精彩评论

暂无评论...
验证码 换一张
取 消