I have the following code:
var path = NSIndexPath(forRow: index, inSection:0);
and I get a compiler warning saying:
Extra Argument 'inSection' in call
Why? I see the initializer in the documentation here:
I imported UIKit, and even tried doing something like:
var path = UIKit.NSIndexPath(forRow: index, inSection:0);
What am I misunderstanding here?
EDIT:
var index = 0;
for (key, value) in map! {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), { (index) in
//some code
dispatch_async(dispatch_get_main_queue(), { (index) in
println("reloadRow row=" + String(index) + ",inSection:0");
var path = NSIndexPath(forRow: index, inSection:0);
self.tableView.reloadRowsAtIndexPaths([path], withRowAnimation: UITableViewRowAnimation.Automatic);
});
});
index++;
}
indexdefined? - Mike Svar index = 0;Hold on, let me post the whole code block, because maybe the way I am using closures has something to do with this. - thatidiotguy