I have two classes Model and View Controller. Model is providing value for View Controller and View Controller is returning new value to Model.
class Model : NSObject {
var session : Int = 0
}
class ViewController : WKInterfaceController {
var newSession = Model().session
let counter = 5
for var index = 0; index < counter.count ; ++index {
newSession++
}
}
print(Model.session) // How to set value of Model.session === newSession?
How to provide Model.session with the new calculated value of newSession?