I have hundreds of instance variables in a class. Everytime I work on the class I have to scroll past them.
I would very much like to put them in a different file - like a header file.
I tried using an extension:
extension MyClass {
var foo = 0
}
But I get the error Extensions must not contain stored properties
.
Is it possible to define instance variables outside the main swift class file? I have made extensive use of extensions, but the init methods still need to be in the root class file.