I am not having any luck mutating a var in a structure, and yes, the method is defined as 'mutating'
here's the struct definition:
struct OnboardingSwipeableView: View{
static var shared = OnboardingSwipeableView()
@State var currentPage = 0
var lock = NSLock()
<snip>
here's the method:
mutating func goToNextPage(){
currentPage = self.currentPage+1
print("OBM->goToNestPage: currentPage=\(self.currentPage)")
}
however currentPage is not being updated. What gives?