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

関連する問題