Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7934473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:39:28+00:00 2026-06-03T21:39:28+00:00

I am creating an app for iOS 5 and I am getting the following

  • 0

I am creating an app 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 have tried to debug the error and can see that it occurs because I connect an item to an IBOutletCollection.

The IBOutletCollection is being defined as follows:

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

with

NSSet *Balls;

being defined as an instance variable.

Whenever I have not connected a Ball to the collection in interface builder the app will load fine. However, as soon as any of the balls are added to the collection then I will get an error after the ViewController and all the balls have been instantiated and before ViewDidLoad in the ViewController.

It was working fine and then I repositioned some of the layers and now I can’t get rid of this error.

If anyone can help with even a suggestion of why this is happening or even just an iOS 5 example of using IBOutletCollection (in case I have done something wrong in the setup, but I don’t think I have) then it would be much appreciated.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:39:29+00:00Added an answer on June 3, 2026 at 9:39 pm

    Instead of using IBOutletCollection you can get the view that contains all the items you want in the collection and connect it using IBOutlet. Then use:

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

    This will retrieve all the items from the view that are of the specific type and then you can simply add them to the collection. This only gets all the items if they are directly on the view you are iterating through. If there a subviews that also contain items you want you will have to call this method recursively.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

1)I am creating a ios app in which I have to scan a pool
I've been tasked with creating an IM app for IOS. I currently have an
I am creating ios app in xcode 4.2. I have outside file with database.
I'm creating an iOS app who will have to stop the standby timer. I
I have an app in Flash CS5 that I am creating for iOS. I
We're creating an iOS photo app. In doing this, we have to create dynamically
I am currently creating an iOS Newsstand app. I have issues added and working
I am currently creating an iOS app, which connects to a database and asynchronously
I am creating a quiz style app for iOS using phonegap. The app allows
I'm creating an app that tracks your elevation. Currently IOS is one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.