quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

NSScreencast Episode #141 Simulating Rope with UIKit Dynamics

Simulating Rope with UIKit Dynamics - NSScreencast

ロープにぶら下がった物体のアニメーション

⌘Boom - Creating a rope with UIDynamics

  • bang
  • link 〔つながっている物の〕一つ
  • if index == 0
    • else
      • let previousLink = links[index-1]
  • UIAttachmentBehavior
  • UIDynamicAnimator
    • UIGravityBehavior
    • UICollisionBehavior
    • animator.addBehavior(gravity)
  • UIBezierPath
    • override func drawRect(rect: CGRect)
    • var path = UIBezierPath()
      • path.lineCapStyle = kCGLineCapRound
      • path.lineJoinStyle = kCGLineJoinRound
      • path.lineWidth = segmentWidth
    • path.moveToPoint(start)
    • path.addLineToPoint(link.center)
    • UIColor.blueColor().setStroke()
    • path.stroke()