= redactions.map({ $0.UUID }) for UUID in selectedUUIDs { if let index = find(allUUIDs, UUID) { selected.append(redactions[index]) } } return selected }
if let layer = boundingBoxes[redaction.UUID] { var rect = redaction.rectForBounds(imageRect) rect.inset(dx: -2, dy: -2) layer.frame = rect } } CATransaction.commit() NSNotificationCenter.defaultCenter().postNotificationName(... }
draggingMode { case let .Creating(UUID): // Update size based on origin and current point case let .Moving(UUID, rect, startPoint): // Update rect based on original rect and start point } } // End dragging if state == .Ended { draggingMode = nil } }