这段代码的问题(在func tableView中(tableView:UITableView,commitEditingStyle editingStyle:UITableViewCellEditingStyle,forRowAtIndexPath indexPath:NSIndexPath))
tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Automatic)
if indexPath.row > 1{
tableView.reloadRowsAtIndexPaths([NSIndexPath(forRow: indexPath.row-1, inSection: 0)], withRowAnimation: .None)
}
if tDate[activeRow].count == 0{
tableView.reloadRowsAtIndexPaths([NSIndexPath(forRow: 0, inSection: 0)], withRowAnimation: .None)
}
Run Code Online (Sandbox Code Playgroud)
是两个reloadRowsAtIndexPaths动画,虽然withRowAnimation:.None被指定.我在这里错过了什么?
当我开始监视像这样的地区时
locationManager.startMonitoringForRegion(tGeoFence[wert][wert2])
Run Code Online (Sandbox Code Playgroud)
并尝试确定它是否已经在此之后输入:
for region in locationManager.monitoredRegions {
if let cireg = region as? CLCircularRegion {
if cireg.identifier == tGeoFence[wert][wert2].identifier {
locationManager.requestStateForRegion(cireg)
}
}
}
Run Code Online (Sandbox Code Playgroud)
不起作用,导致在执行代码的第二部分时未完成区域的注册.延迟该部分的执行似乎很难看(确定并不总是被调用),有没有更好的方法来解决这个问题?