compiler-errors - 将代码从 Objective-C 转换为 Swift

标签 compiler-errors swift

我在 Objective-C 中得到了这行代码,我绝对需要将它“翻译”成 Swift。

BOOL hasBlur = blurRadius > __FLT_EPSILON__

不幸的是我得到了这个错误:

Use of unresolved identifier __FLT_EPSILON_

你能帮帮我吗? 谢谢

最佳答案

For swift 3.1 OR above

CGFloat.ulpOfOne

Double.ulpOfOne

关于compiler-errors - 将代码从 Objective-C 转换为 Swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25492268/

相关文章:

c++ - vector .erase 错误 c2664

c++ - 创建一个越界数组

ios - 为什么我收到错误 'Type ViewController does not conform to protocol UIPageViewControllerDataSource'?

ios - 在 Swift 中声明具有类型约束的属性

java - 错误 : Could not find or load main class in intelliJ IDE

sql - SQL函数应该出错但创建成功

sql - SQL触发器(编译错误)

ios - 等待多个 Alamofire 请求完成

ios - Alamofire 4.3 无法发送 JSON 请求

ios - 没有这样的模块 'AgoraRtcKit' Xcode Swift 错误