I fount this solution but I can't make it into swift code
This what I try
var pattern[2]:CGFloat; this
var dashed: CGPathRef = CGPathCreateCopyByDashingPath(CGPathCreateCopyByDashingPath(path, transform, phase, lengths, count);
var myShapeNode: SKShapeNode!;
var CGPathCreateCopyByDashingPath:CGPathRef;