It\'s easy to draw a dashed line with UIKit. So:
CGFloat dashes[] = {4, 2}; [path setLineDash:dashes count:2 phase:0]; [path stroke];
Working fine with the below code,
layer.path = linePath.cgPath layer.lineWidth = 3 layer.lineDashPattern = [1,layer.lineWidth*2] as [NSNumber] layer.lineCap = "round"