UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Can’t use repeating content in outlet so IndexPath invalid

Forums > iOS

So... basically I came up with the common error of 'An outlet cannot be connected to repeating content' because in one of my view controller classes, I have imported a prototype item cell. After some searching, I understand the problem and how to fix it, the only issue is that I can't use a subclass of an item cell to import what I need, because I need to import the cell itself. I need to do this so I can access it in an indexPath and my whole project actually works. I was following a tutorial on getting HomeKit working in your app, and the guy basically filled up an entire view controller with a collection view. I didn't want that because it meant I couldn't put a logo on the screen or a filter, which I needed for my app, so I changed it and made it a collection view on the screen I can resize, adjust, and move around. Unfortuanetly, that caused a bunch of errors, so I went through them all and managed to knock them out one by one, except this error. My only problem is that I need a cell through an indexpath for one of the essential methods, but of course, I can't get that cell. Can anyone help?

3      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.