I want to create a class that inherits from another class, which is in a different file.
For example:
Class1.swift
class Class1
{
protected var
//Do Stuff
}
Class2.swift
class Class2:Class1
{
//Do stuff
}
How would I be able to have access to a 'protected' variable/function in swift?
When I declare a private variable/function, I can only use it in that class. If I use 'fileprivate', my other class HAS to be in the same file as Class1
. What I want to do is keep my classes in separate files and use the Groups from within Xcode to know what class belongs with which category.