Swift 4改变物理重力

时间:2017-09-02 19:14:37

标签: ios swift sprite-kit swift4

因为swift 4旧的重力代码不再起作用了......

select * from ProductTBL as ProTBL 
left join ( select * from PicTBL PicTBLOne where not exists (   
    select * from PicTBL PicTblOther 
        where   PicTBLOne.ProductID_FK=PicTBLOther.ProductID_FK AND PicTBLOne.id > PicTBLOther.id 
    )
) as pic on ProTBL.ProductID = pic.ProductID_FK

这不起作用↑ 你能给我新代码吗? 谢谢!

1 个答案:

答案 0 :(得分:3)

CGVectorMake已被弃用。使用以下语法初始化CGVector:

self.physicsWorld.gravity = CGVector(dx: 0, dy: 0)

或者,因为你想要一个包含两个组件的向量0:

self.physicsWorld.gravity = CGVector.zero