Xcode throws a Sigabrt error whenever I start due to IBOutletCollection

I am creating an application for iOS 5 and I am getting the following error:

Assertion failure in -[UIRuntimeOutletCollectionConnection performConnect], /SourceCache/UIKit_Sim/UIKit-1912.3/UIRuntimeOutletCollectionConnection.m:43

I tried to debug the error and see that this is happening because I am connecting the element with IBOutletCollection.

IBOutletCollection is defined as follows:

@property (strong) IBOutletCollection(BallButton) NSSet *Balls;

with

NSSet *Balls;

defined as an instance variable.

Whenever I did not connect Ball to the collection in the interface builder, the application will load fine. However, as soon as any of the balls is added to the collection, I get an error message after the ViewController and all the balls were created before the ViewDidLoad in the ViewController.

It worked perfectly, and then I moved some layers, and now I can not get rid of this error.

- , iOS 5 IBOutletCollection ( - , , ), .

+3
2

IBOutletCollection , , , IBOutlet. :

- (NSSet *)getBallsFromView:(UIView *)view
{
    NSMutableSet *balls = [[NSMutableSet alloc] init];
    for (UIView *subview in [view subviews]) 
    {
        if ([subview isKindOfClass:[BallButton class]])
            [balls addObject:(BallButton *)subview];
    }
}

, . , , . subviews, , , .

0

IBOutletCollections NSArray, NSSet. :

@property (strong, nonatomic) IBOutletCollection(BallButton) NSArray *Balls;
0

All Articles