[已解决]Swift代码出错:Binary operator / cannot be applied to operands of type CGFloat and Int

解决方法

let indexTemp:CGFloat = 12.4

1. Double(indexTemp/4)

2. Double(CGFloat(indexTemp)/CGFloat(4))

    原文作者:稻草人_dancer
    原文地址: https://www.jianshu.com/p/864dbb2c8ef6
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞