Cannot seem to use CGRectIntegral and CGRectInset functions in Swift

前端 未结 3 1397
星月不相逢
星月不相逢 2021-01-18 23:43

Sorry for the novice question.

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

3条回答
  •  梦谈多话
    2021-01-19 00:04

    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)
    

提交回复
热议问题