Basically I am doing some computation for which I need to have an Int
variable initiating with 0
in cellForRowAtIndexPath
everytime I reload the table view.
In Objective-C, I used this in cellForRowAtIndexPath of UITableView
static int rowSum= 0;
rowSum += [[myArray objectAtIndex:indexPath.Row] intValue];
How do we do this in Swift language ? The suggested link does not do that.