Converting a CGPoint to NSValue

后端 未结 7 1911
猫巷女王i
猫巷女王i 2020-12-17 09:42

In CABasicAnimation.fromValue I want to convert a CGPoint to a \"class\" so I used NSValue valueWithPoint but in device m

7条回答
  •  醉话见心
    2020-12-17 10:36

    In Swift the static method is change to an initialiser method:

    var pointValue = CGPointMake(10,10)
    NSValue(CGPoint: pointValue)
    

提交回复
热议问题