小编Han*_*ber的帖子

没有行动画动画的ReloadRowsAtIndexPaths

这段代码的问题(在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被指定.我在这里错过了什么?

uitableview xcode7 swift2

10
推荐指数
2
解决办法
4583
查看次数

在Swift中的startMonitoringForRegion之后的RequestStateForRegion

当我开始监视像这样的地区时

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)

不起作用,导致在执行代码的第二部分时未完成区域的注册.延迟该部分的执行似乎很难看(确定并不总是被调用),有没有更好的方法来解决这个问题?

cllocationmanager swift2

2
推荐指数
1
解决办法
1084
查看次数

标签 统计

swift2 ×2

cllocationmanager ×1

uitableview ×1

xcode7 ×1