Not sure I understand.
I have a class that has a var let's say "var isRunning: Bool = false",
So, you have
class A {
var isRunning: Bool = false
}
within it's parent another class instance
is class A a subclass of a parent B ? so it would be
class A : B {
var isRunning: Bool = false
}
Now, this is not clear at all:
class instance with the same var where I want it to be controlled from
Do you mean
class B {
var anotherBool: Bool = false
}
and you want a change to anotherBool to change isRunning ? I'm lost.
Or do you want
class B {
var isRunning: Bool = false
}
Then, no need to redefine in subclass A…
Please clarify so that we can continue the discussion.
May be you should use delegation or notification (or a more direct solution) here, but we need first to clarify your intent.