2016-07-08 7 views

답변

-1
 var aPath = UIBezierPath() 

     aPath.moveToPoint(CGPoint(x:/*Put starting Location*/ y:/*Put starting Location*/)) 

     aPath.addLineToPoint(CGPoint(x:/*Put Next Location*/ y:/*Put Next Location*/)) 

     //Keep using the method addLineToPoint until you get to the one where about to close the path 

     aPath.closePath() 

     //If you want to stroke it with a red color 
     UIColor.redColor().set() 
     aPath.stroke() 
     //If you want to fill it as well 
     aPath.fill() 

}

. 에 refrence How to draw a line in the simplest way in swift

+0

그것은 spritekit 아니에요 – iLandes