本文介绍了在Swift中似乎无法使用CGRectIntegral和CGRectInset函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
很抱歉出现新手问题.
但是正如标题所示,我似乎无法在Swift 3中使用这些功能.我尝试过导入CoreGraphics库,但无济于事.
But just as the title says, I can't seem to use these functions in Swift 3. I have tried by importing the CoreGraphics library, but to no avail.
有人知道为什么吗?
谢谢.
推荐答案
功能正常,但它们的名称已更改(有点):
The functions are working fine, but their names have changed (a bit):
let frame = CGRect.zero
let x = frame.integral
frame.insetBy(dx: 0, dy: 0)
这篇关于在Swift中似乎无法使用CGRectIntegral和CGRectInset函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!